@@ -1494,14 +1494,14 @@ process bwa {
14941494 """
14951495 bwa aln -t ${ task.cpus} $fasta ${ r1} -n ${ params.bwaalnn} -l ${ params.bwaalnl} -k ${ params.bwaalnk} -f ${ libraryid} .r1.sai
14961496 bwa aln -t ${ task.cpus} $fasta ${ r2} -n ${ params.bwaalnn} -l ${ params.bwaalnl} -k ${ params.bwaalnk} -f ${ libraryid} .r2.sai
1497- bwa sampe -r "@RG\\ tID:ILLUMINA-${ libraryid} \\ tSM:${ libraryid} \\ tPL:illumina" $fasta ${ libraryid} .r1.sai ${ libraryid} .r2.sai ${ r1} ${ r2} | samtools sort -@ ${ task.cpus} -O bam - > ${ libraryid} _"${ seqtype} ".mapped.bam
1497+ bwa sampe -r "@RG\\ tID:ILLUMINA-${ libraryid} \\ tSM:${ libraryid} \\ tPL:illumina\\ tPU:ILLUMINA- ${ libraryid } - ${ seqtype } " $fasta ${ libraryid} .r1.sai ${ libraryid} .r2.sai ${ r1} ${ r2} | samtools sort -@ ${ task.cpus} -O bam - > ${ libraryid} _"${ seqtype} ".mapped.bam
14981498 samtools index "${ libraryid} "_"${ seqtype} ".mapped.bam ${ size}
14991499 """
15001500 } else {
15011501 // PE collapsed, or SE data
15021502 """
15031503 bwa aln -t ${ task.cpus} ${ fasta} ${ r1} -n ${ params.bwaalnn} -l ${ params.bwaalnl} -k ${ params.bwaalnk} -f ${ libraryid} .sai
1504- bwa samse -r "@RG\\ tID:ILLUMINA-${ libraryid} \\ tSM:${ libraryid} \\ tPL:illumina" $fasta ${ libraryid} .sai $r1 | samtools sort -@ ${ task.cpus} -O bam - > "${ libraryid} "_"${ seqtype} ".mapped.bam
1504+ bwa samse -r "@RG\\ tID:ILLUMINA-${ libraryid} \\ tSM:${ libraryid} \\ tPL:illumina\\ tPU:ILLUMINA- ${ libraryid } - ${ seqtype } " $fasta ${ libraryid} .sai $r1 | samtools sort -@ ${ task.cpus} -O bam - > "${ libraryid} "_"${ seqtype} ".mapped.bam
15051505 samtools index "${ libraryid} "_"${ seqtype} ".mapped.bam ${ size}
15061506 """
15071507 }
@@ -1531,12 +1531,12 @@ process bwamem {
15311531
15321532 if (! params. single_end && params. skip_collapse){
15331533 """
1534- bwa mem -t ${ task.cpus} $fasta $r1 $r2 -R "@RG\\ tID:ILLUMINA-${ libraryid} \\ tSM:${ libraryid} \\ tPL:illumina" | samtools sort -@ ${ task.cpus} -O bam - > "${ libraryid} "_"${ seqtype} ".mapped.bam
1534+ bwa mem -t ${ task.cpus} $fasta $r1 $r2 -R "@RG\\ tID:ILLUMINA-${ libraryid} \\ tSM:${ libraryid} \\ tPL:illumina\\ tPU:ILLUMINA- ${ libraryid } - ${ seqtype } " | samtools sort -@ ${ task.cpus} -O bam - > "${ libraryid} "_"${ seqtype} ".mapped.bam
15351535 samtools index ${ size} -@ ${ task.cpus} "${ libraryid} ".mapped.bam
15361536 """
15371537 } else {
15381538 """
1539- bwa mem -t ${ task.cpus} $fasta $r1 -R "@RG\\ tID:ILLUMINA-${ libraryid} \\ tSM:${ libraryid} \\ tPL:illumina" | samtools sort -@ ${ task.cpus} -O bam - > "${ libraryid} "_"${ seqtype} ".mapped.bam
1539+ bwa mem -t ${ task.cpus} $fasta $r1 -R "@RG\\ tID:ILLUMINA-${ libraryid} \\ tSM:${ libraryid} \\ tPL:illumina\\ tPU:ILLUMINA- ${ libraryid } - ${ seqtype } " | samtools sort -@ ${ task.cpus} -O bam - > "${ libraryid} "_"${ seqtype} ".mapped.bam
15401540 samtools index -@ ${ task.cpus} "${ libraryid} "_"${ seqtype} ".mapped.bam ${ size}
15411541 """
15421542 }
@@ -1600,15 +1600,15 @@ process circularmapper{
16001600 """
16011601 bwa aln -t ${ task.cpus} $elongated_root $r1 -n ${ params.bwaalnn} -l ${ params.bwaalnl} -k ${ params.bwaalnk} -f ${ libraryid} .r1.sai
16021602 bwa aln -t ${ task.cpus} $elongated_root $r2 -n ${ params.bwaalnn} -l ${ params.bwaalnl} -k ${ params.bwaalnk} -f ${ libraryid} .r2.sai
1603- bwa sampe -r "@RG\\ tID:ILLUMINA-${ libraryid} \\ tSM:${ libraryid} \\ tPL:illumina" $elongated_root ${ libraryid} .r1.sai ${ libraryid} .r2.sai $r1 $r2 > tmp.out
1603+ bwa sampe -r "@RG\\ tID:ILLUMINA-${ libraryid} \\ tSM:${ libraryid} \\ tPL:illumina\\ tPU:ILLUMINA- ${ libraryid } - ${ seqtype } " $elongated_root ${ libraryid} .r1.sai ${ libraryid} .r2.sai $r1 $r2 > tmp.out
16041604 realignsamfile -e ${ params.circularextension} -i tmp.out -r $fasta $filter
16051605 samtools sort -@ ${ task.cpus} -O bam tmp_realigned.bam > ${ libraryid} _"${ seqtype} ".mapped.bam
16061606 samtools index "${ libraryid} "_"${ seqtype} ".mapped.bam ${ size}
16071607 """
16081608 } else {
16091609 """
16101610 bwa aln -t ${ task.cpus} $elongated_root $r1 -n ${ params.bwaalnn} -l ${ params.bwaalnl} -k ${ params.bwaalnk} -f ${ libraryid} .sai
1611- bwa samse -r "@RG\\ tID:ILLUMINA-${ libraryid} \\ tSM:${ libraryid} \\ tPL:illumina" $elongated_root ${ libraryid} .sai $r1 > tmp.out
1611+ bwa samse -r "@RG\\ tID:ILLUMINA-${ libraryid} \\ tSM:${ libraryid} \\ tPL:illumina\\ tPU:ILLUMINA- ${ libraryid } - ${ seqtype } " $elongated_root ${ libraryid} .sai $r1 > tmp.out
16121612 realignsamfile -e ${ params.circularextension} -i tmp.out -r $fasta $filter
16131613 samtools sort -@ ${ task.cpus} -O bam tmp_realigned.bam > "${ libraryid} "_"${ seqtype} ".mapped.bam
16141614 samtools index "${ libraryid} "_"${ seqtype} ".mapped.bam ${ size}
@@ -1677,13 +1677,13 @@ process bowtie2 {
16771677 // PE data without merging, PE data without any AR applied
16781678 if ( seqtype == ' PE' && ( params. skip_collapse || params. skip_adapterremoval ) ){
16791679 """
1680- bowtie2 -x ${ fasta} -1 ${ r1} -2 ${ r2} -p ${ task.cpus} ${ sensitivity} ${ bt2n} ${ bt2l} ${ trim5} ${ trim3} 2> "${ libraryid} "_bt2.log | samtools sort -@ ${ task.cpus} -O bam > "${ libraryid} "_"${ seqtype} ".mapped.bam
1680+ bowtie2 -x ${ fasta} -1 ${ r1} -2 ${ r2} -p ${ task.cpus} ${ sensitivity} ${ bt2n} ${ bt2l} ${ trim5} ${ trim3} --rg-id ILLUMINA- ${ libraryid } --rg SM: ${ libraryid } --rg PL:illumina --rg PU:ILLUMINA- ${ libraryid } - ${ seqtype } 2> "${ libraryid} "_bt2.log | samtools sort -@ ${ task.cpus} -O bam > "${ libraryid} "_"${ seqtype} ".mapped.bam
16811681 samtools index "${ libraryid} "_"${ seqtype} ".mapped.bam ${ size}
16821682 """
16831683 } else {
16841684 // PE collapsed, or SE data
16851685 """
1686- bowtie2 -x ${ fasta} -U ${ r1} -p ${ task.cpus} ${ sensitivity} ${ bt2n} ${ bt2l} ${ trim5} ${ trim3} 2> "${ libraryid} "_bt2.log | samtools sort -@ ${ task.cpus} -O bam > "${ libraryid} "_"${ seqtype} ".mapped.bam
1686+ bowtie2 -x ${ fasta} -U ${ r1} -p ${ task.cpus} ${ sensitivity} ${ bt2n} ${ bt2l} ${ trim5} ${ trim3} --rg-id ILLUMINA- ${ libraryid } --rg SM: ${ libraryid } --rg PL:illumina --rg PU:ILLUMINA- ${ libraryid } - ${ seqtype } 2> "${ libraryid} "_bt2.log | samtools sort -@ ${ task.cpus} -O bam > "${ libraryid} "_"${ seqtype} ".mapped.bam
16871687 samtools index "${ libraryid} "_"${ seqtype} ".mapped.bam ${ size}
16881688 """
16891689 }
0 commit comments