Skip to content

Commit

Permalink
Merge pull request #10 from moka-guys/get_vcf_output
Browse files Browse the repository at this point in the history
v1.3.1_get_vcf_output (#10)
  • Loading branch information
natashapinto authored Oct 29, 2024
2 parents e693b56 + 5a1dc42 commit 6b748d0
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 9 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# dnanexus_ED_cnv_analysis_v1.3.0
# dnanexus_ED_cnv_analysis_v1.3.1
Performs CNV calling using ExomeDepth.

Exome depth is run in two stages. Firstly, read counts are calculated, before CNVs are called using the read counts. Read counts are calculated over the entire genome whereas the CNV calling can be performed using a subpanel.
Expand All @@ -19,6 +19,7 @@ For further details on the usage of the docker image please refer to https://git
- Readcount file generated using https://github.com/moka-guys/dnanexus\_ED\_readcount_analysis
- List of comma seperated pan numbers (Pan4127,Pan4129,Pan4130,Pan4049)
- Test specific BED file
- reference genome file (hs37d5.fa.gz)
Note: Transitional probability is set to 0.01, the default value is 0.001 (too many false positives during testing).
See CLI command below for an example of inputs.

Expand All @@ -27,14 +28,15 @@ See CLI command below for an example of inputs.
- output.tex - Intermediate file used to create PDF
- tables-1.pdf, tables-2.pdf etc - Plots for inclusion in the generated reports
- output.bed - CNVs in BED format (whole panel)
- output.RData
- output.RData
- output.vcf

# Running from the CLI:

The app can be run from the dx CLI. The example below shows the code used to run test samples through this app:

```bash
dx run project-G0pKxX80pgqFk9Vy8p6vQbKv:applet-G7B5Zxj0pgq9Q8JfP0jpY3y4 -iproject_name=003_220103_exomeDepth_calling_test -ireadcount_file=project-G6jb1k807Xjj1J984K6kfP13:file-G6kg5q80gvvz37qZ4ZPbvZ8Q -ibamfile_pannumbers=Pan4127,Pan4129,Pan4130,Pan4049 -isubpanel_bed=project-ByfFPz00jy1fk6PjpZ95F27J:file-G6kZpqQ0jy1q1Zk94G3qbVyV
dx run project-G0pKxX80pgqFk9Vy8p6vQbKv:applet-G7B5Zxj0pgq9Q8JfP0jpY3y4 -iproject_name=003_220103_exomeDepth_calling_test -ireadcount_file=project-G6jb1k807Xjj1J984K6kfP13:file-G6kg5q80gvvz37qZ4ZPbvZ8Q -ibamfile_pannumbers=Pan4127,Pan4129,Pan4130,Pan4049 -isubpanel_bed=project-ByfFPz00jy1fk6PjpZ95F27J:file-G6kZpqQ0jy1q1Zk94G3qbVyV -ireference_genome=project-ByfFPz00jy1fk6PjpZ95F27J:file-B6ZY7VG2J35Vfvpkj8y0KZ01
```
# Debugging

Expand Down
28 changes: 24 additions & 4 deletions dxapp.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"name": "ED_cnv_calling_v1.3.0",
"title": "ED_cnv_calling_v1.3.0",
"summary": "v1.3.0 - Performs CNV calling using ExomeDepth",
"name": "ED_cnv_calling_v1.3.1",
"title": "ED_cnv_calling_v1.3.1",
"summary": "v1.3.1 - Performs CNV calling using ExomeDepth",
"properties": {
"github release": "v1.3.0"
"github release": "v1.3.1"
},
"dxapi": "1.0.0",
"inputSpec": [
Expand All @@ -13,6 +13,26 @@
"help": "The project containing the bamfiles.",
"class": "string"
},
{
"name": "reference_genome",
"label": "reference fasta file",
"help": "reference_genome",
"class": "file",
"patterns": ["*.fa", "*.fa.gz"],
"optional": false,
"suggestions": [
{
"name": "hs37d5.fa.gz",
"value": {
"$dnanexus_link": {
"project": "project-ByfFPz00jy1fk6PjpZ95F27J",
"id": "file-B6ZY7VG2J35Vfvpkj8y0KZ01"
}
},
"region": "aws:us-east-1"
}
]
},
{
"name": "readcount_file",
"label": "readcount.Rdata",
Expand Down
18 changes: 16 additions & 2 deletions src/code.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#!/bin/bash
# exomedepth_cnv_analysis_v1.3.0
# exomedepth_cnv_analysis_v1.3.1

# The following line causes bash to exit at any point if there is any error
# and to output each line as it is executed -- useful for debugging
Expand Down Expand Up @@ -31,6 +31,20 @@ mkdir to_test
# Download inputs
dx-download-all-inputs --parallel

mark-section "Determining reference genome"
if [[ $reference_genome_name == *.tar* ]]
then
echo "reference is tarball"
exit 1
elif [[ $reference_genome_name == *.gz ]]
then
gunzip $reference_genome_path
reference_fasta=$(echo $reference_genome_path | sed 's/\.gz//g')
elif [[ $reference_genome_name == *.fa ]]
then
reference_fasta=$reference_genome_path
fi

# cd to test dir
cd to_test

Expand Down Expand Up @@ -114,7 +128,7 @@ echo "RDATA = " "$readcount_file_name"
docker run -v /home/dnanexus:/home/dnanexus/ \
--rm ${DOCKERIMAGENAME} \
exomeDepth.R \
'v1.3.0' \
'v1.3.1' \
/home/dnanexus/out/exomedepth_output/exomedepth_output/"$samplename"_output.pdf \
/home/dnanexus/in/subpanel_bed/"$subpanel_bed_name":"$subpanel_bed_prefix" \
/home/dnanexus/in/readcount_file/"$readcount_file_name" "$bam":"$samplename":0.01 $QC_file
Expand Down

0 comments on commit 6b748d0

Please sign in to comment.