Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* [#80](https://github.com/nf-core/eager/pull/80) - BWA Index file handling
* [#77](https://github.com/nf-core/eager/pull/77) - Lots of documentation updates by [@jfy133](https://github.com/jfy133)

### `Fixed`
* [#84](https://github.com/nf-core/eager/pull/85) - Fix for [Samtools index issues](https://github.com/nf-core/eager/issues/84)

## [2.0.2] - 2018-11-03

### `Changed`
Expand Down
12 changes: 6 additions & 6 deletions main.nf
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,7 @@ process bwa {
"""
bwa aln -t ${task.cpus} $fasta $reads -n ${params.bwaalnn} -l ${params.bwaalnl} -k ${params.bwaalnk} -f "${reads.baseName}.sai"
bwa samse -r "@RG\\tID:ILLUMINA-${prefix}\\tSM:${prefix}\\tPL:illumina" $fasta "${reads.baseName}".sai $reads | samtools sort -@ ${task.cpus} -O bam - > "${prefix}".sorted.bam
samtools index -@ ${task.cpus} "${prefix}".sorted.bam
samtools index "${prefix}".sorted.bam
"""
}

Expand Down Expand Up @@ -642,7 +642,7 @@ process circularmapper{
bwa samse -r "@RG\\tID:ILLUMINA-${prefix}\\tSM:${prefix}\\tPL:illumina" "${fasta.baseName}_${params.circularextension}.fasta" "${reads.baseName}".sai $reads > tmp.out
realignsamfile -e ${params.circularextension} -i tmp.out -r $fasta $filter
samtools sort -@ ${task.cpus} -O bam tmp_realigned.bam > "${prefix}".sorted.bam
samtools index -@ ${task.cpus} "${prefix}".sorted.bam
samtools index "${prefix}".sorted.bam
"""
}

Expand Down Expand Up @@ -724,12 +724,12 @@ process samtools_filter {
"""
samtools view -h $bam | tee >(samtools view - -@ ${task.cpus} -f4 -q ${params.bam_mapping_quality_threshold} -o ${prefix}.unmapped.bam) >(samtools view - -@ ${task.cpus} -F4 -q ${params.bam_mapping_quality_threshold} -o ${prefix}.filtered.bam)
samtools fastq -tn "${prefix}.unmapped.bam" | gzip > "${prefix}.unmapped.fq.gz"
samtools index -@ ${task.cpus} ${prefix}.filtered.bam
samtools index ${prefix}.filtered.bam
"""
} else {
"""
samtools view -h $bam | tee >(samtools view - -@ ${task.cpus} -f4 -q ${params.bam_mapping_quality_threshold} -o ${prefix}.unmapped.bam) >(samtools view - -@ ${task.cpus} -q ${params.bam_mapping_quality_threshold} -o ${prefix}.filtered.bam)
samtools index -@ ${task.cpus} ${prefix}.filtered.bam
samtools index ${prefix}.filtered.bam
"""
}
}
Expand Down Expand Up @@ -764,14 +764,14 @@ process dedup{
dedup -i $bam $treat_merged -o . -u
mv *.log dedup.log
samtools sort -@ ${task.cpus} "$prefix"_rmdup.bam -o "$prefix".sorted.bam
samtools index -@ ${task.cpus} "$prefix".sorted.bam
samtools index "$prefix".sorted.bam
"""
} else {
"""
dedup -i $bam $treat_merged -o . -u
mv *.log dedup.log
samtools sort -@ ${task.cpus} "$prefix"_rmdup.bam -o "$prefix".sorted.bam
samtools index -@ ${task.cpus} "$prefix".sorted.bam
samtools index "$prefix".sorted.bam
"""
}
}
Expand Down