Commit 930102e8 authored by Brandi Cantarel's avatar Brandi Cantarel

adding cleansam

parent f426c0f1
#!/usr/bin/env nextflow #!/usr/bin/env nextflow
// Default parameter values to run tests // Default parameter values to run tests
params.bamdna="$baseDir/../test_data/dna/*.bam" params.bamdna="$baseDir/../test_data/dna/safe/*.bam"
params.bamrna="$baseDir/../test_data/rna/*.bam" params.bamrna="$baseDir/../test_data/*.bam"
rnabams=file(params.bamrna) rnabams=file(params.bamrna)
dnabams=file(params.bamdna) dnabams=file(params.bamdna)
params.incdna = '1' params.incdna = '0'
params.design="$baseDir/../test_data/design.txt" params.design="$baseDir/../test_data/design.txt"
...@@ -85,7 +85,8 @@ process gatkbam { ...@@ -85,7 +85,8 @@ process gatkbam {
script: script:
""" """
module load gatk/3.5 samtools/intel/1.3 speedseq/20160506 picard/1.127 module load gatk/3.5 samtools/intel/1.3 speedseq/20160506 picard/1.127
java -Xmx4g -jar \$PICARD/picard.jar AddOrReplaceReadGroups INPUT=${rbam} O=${pair_id}.rg_added_sorted.bam SO=coordinate RGID=${pair_id} RGLB=tx RGPL=illumina RGPU=barcode RGSM=${pair_id} java -Xmx4g -jar \$PICARD/picard.jar CleanSam INPUT=${rbam} O=${pair_id}.clean.bam
java -Xmx4g -jar \$PICARD/picard.jar AddOrReplaceReadGroups INPUT=${pair_id}.clean.bam O=${pair_id}.rg_added_sorted.bam SO=coordinate RGID=${pair_id} RGLB=tx RGPL=illumina RGPU=barcode RGSM=${pair_id}
sambamba markdup -t 20 -r ${pair_id}.rg_added_sorted.bam ${pair_id}.dedup.bam sambamba markdup -t 20 -r ${pair_id}.rg_added_sorted.bam ${pair_id}.dedup.bam
java -Xmx4g -jar \$GATK_JAR -T SplitNCigarReads -R ${gatkref} -I ${pair_id}.dedup.bam -o ${pair_id}.split.bam -rf ReassignOneMappingQuality -RMQF 255 -RMQT 60 -U ALLOW_N_CIGAR_READS java -Xmx4g -jar \$GATK_JAR -T SplitNCigarReads -R ${gatkref} -I ${pair_id}.dedup.bam -o ${pair_id}.split.bam -rf ReassignOneMappingQuality -RMQF 255 -RMQT 60 -U ALLOW_N_CIGAR_READS
java -Xmx4g -jar \$GATK_JAR -l INFO -R ${gatkref} --knownSites ${dbsnp} -I ${pair_id}.split.bam -T BaseRecalibrator -cov ReadGroupCovariate -cov QualityScoreCovariate -cov CycleCovariate -cov ContextCovariate -o ${pair_id}.recal_data.grp -nt 1 -nct 30 java -Xmx4g -jar \$GATK_JAR -l INFO -R ${gatkref} --knownSites ${dbsnp} -I ${pair_id}.split.bam -T BaseRecalibrator -cov ReadGroupCovariate -cov QualityScoreCovariate -cov CycleCovariate -cov ContextCovariate -o ${pair_id}.recal_data.grp -nt 1 -nct 30
...@@ -116,6 +117,9 @@ process svcall { ...@@ -116,6 +117,9 @@ process svcall {
""" """
else else
""" """
module load integrate/0.2.6 samtools/intel/1.3 speedseq/20160506
sambamba index ${rbam}
sambamba index ${unmap}
Integrate fusion -reads ${pair_id}.reads.txt -sum ${pair_id}.summary.tsv -ex ${pair_id}.exons.tsv -bk ${pair_id}.breakpoints.tsv -vcf ${pair_id}.bk_sv.vcf -bedpe ${pair_id}.fusions.bedpe ${index_path}/genome.fa ${index_path}/annot.ensembl.txt ${index_path}/bwts/ ${rbam} ${unmap} Integrate fusion -reads ${pair_id}.reads.txt -sum ${pair_id}.summary.tsv -ex ${pair_id}.exons.tsv -bk ${pair_id}.breakpoints.tsv -vcf ${pair_id}.bk_sv.vcf -bedpe ${pair_id}.fusions.bedpe ${index_path}/genome.fa ${index_path}/annot.ensembl.txt ${index_path}/bwts/ ${rbam} ${unmap}
perl $baseDir/scripts/compile_genefusion_results.pl -i ${pair_id} -r ${index_path} perl $baseDir/scripts/compile_genefusion_results.pl -i ${pair_id} -r ${index_path}
""" """
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment