diff --git a/README.md b/README.md index 813bfbc..1c31f83 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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. @@ -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 diff --git a/dxapp.json b/dxapp.json index 4e737b4..58794ab 100644 --- a/dxapp.json +++ b/dxapp.json @@ -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": [ @@ -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", diff --git a/src/code.sh b/src/code.sh index a5358ed..ac304f6 100644 --- a/src/code.sh +++ b/src/code.sh @@ -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 @@ -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 @@ -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