Commit 06beeb76 authored by VIENNE MAINA's avatar VIENNE MAINA
Browse files

replace bedtools bamtofastq with samtools fastq (direct fastq.gz)

parent aec8331d
......@@ -13,12 +13,7 @@ process PROKKA {
"""
prokka --metagenome --noanno --rawproduct --outdir PROKKA_${sampleId} --prefix ${sampleId} ${assembly_file} --centre X --compliant --cpus ${task.cpus}
rm PROKKA_${sampleId}/*.gbk
gt gff3validator PROKKA_${sampleId}/${sampleId}.gff > PROKKA_${sampleId}/${sampleId}_gff3_validator.txt
if grep -Fxqv "input is valid GFF3" PROKKA_${sampleId}/${sampleId}_gff3_validator.txt
then
rm PROKKA_${sampleId}/${sampleId}_gff3_validator.txt
fi
gt gff3validator PROKKA_${sampleId}/${sampleId}.gff
"""
}
......
......@@ -24,8 +24,7 @@ process READS_DEDUPLICATION {
samtools idxstats ${sampleId}.filtered.bam > ${sampleId}.count_reads_on_contigs.idxstats
samtools flagstat ${sampleId}.filtered.bam > ${sampleId}.count_reads_on_contigs.flagstat
samtools sort -n -o ${sampleId}.filtered.sort.bam ${sampleId}.filtered.bam
bedtools bamtofastq -i ${sampleId}.filtered.sort.bam -fq ${sampleId}_R1_dedup.fastq -fq2 ${sampleId}_R2_dedup.fastq
gzip ${sampleId}_R1_dedup.fastq ; gzip ${sampleId}_R2_dedup.fastq
samtools fastq -N -1 ${sampleId}_R1_dedup.fastq.gz -2 ${sampleId}_R2_dedup.fastq.gz ${sampleId}.filtered.sort.bam
rm ${sampleId}.sort.bam
rm ${sampleId}.fixmate.bam
rm ${sampleId}.fixmate.positionsort.bam
......
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