@@ -1039,8 +1039,7 @@ if ( params.skip_collapse ){
10391039
10401040// Inline barcode removal bypass when not running it
10411041if (params. run_post_ar_trimming) {
1042- ch_adapterremoval_for_skip_post_ar_trimming
1043- .dump(tag : " inline_removal_bypass" )
1042+ ch_post_ar_trimming_for_lanemerge
10441043 .into { ch_inlinebarcoderemoval_for_fastqc_after_clipping; ch_inlinebarcoderemoval_for_lanemerge; }
10451044} else {
10461045 ch_adapterremoval_for_skip_post_ar_trimming
@@ -2055,8 +2054,12 @@ process bedtools {
20552054
20562055 script:
20572056 """
2058- bedtools coverage -nonamecheck -a ${ anno_file} -b $bam | pigz -p ${ task.cpus - 1} > "${ bam.baseName} ".breadth.gz
2059- bedtools coverage -nonamecheck -a ${ anno_file} -b $bam -mean | pigz -p ${ task.cpus - 1} > "${ bam.baseName} ".depth.gz
2057+ ## Create genome file from bam header
2058+ samtools view -H ${ bam} | grep '@SQ' | sed 's#@SQ\t SN:\\ |LN:##g' > genome.txt
2059+
2060+ ## Run bedtools
2061+ bedtools coverage -nonamecheck -g genome.txt -sorted -a ${ anno_file} -b ${ bam} | pigz -p ${ task.cpus - 1} > "${ bam.baseName} ".breadth.gz
2062+ bedtools coverage -nonamecheck -g genome.txt -sorted -a ${ anno_file} -b ${ bam} -mean | pigz -p ${ task.cpus - 1} > "${ bam.baseName} ".depth.gz
20602063 """
20612064}
20622065
@@ -3085,7 +3088,7 @@ process get_software_versions {
30853088 ( exec 7>&1; picard MarkDuplicates --version 2>&1 >&7 | grep -v '/' >&2 ) 2> v_markduplicates.txt || true
30863089 qualimap --version &> v_qualimap.txt 2>&1 || true
30873090 preseq &> v_preseq.txt 2>&1 || true
3088- gatk --version 2>&1 | head -n 1 > v_gatk.txt 2>&1 || true
3091+ gatk --version 2>&1 | grep '(GATK)' > v_gatk.txt 2>&1 || true
30893092 gatk3 --version 2>&1 | head -n 1 > v_gatk3.txt 2>&1 || true
30903093 freebayes --version &> v_freebayes.txt 2>&1 || true
30913094 bedtools --version &> v_bedtools.txt 2>&1 || true
0 commit comments