set the minimum contig length in spades
0
0
Entering edit mode
5.8 years ago

Dear Sir/Madam:

I have the following script for spades, quast, and prokka. It is working perfect. However, there are several contigs with less than 200 in length. I need the minimum contig length 200. Spades manual does not say how to do it. Can you please help me with this?

#!/bin/bash
#SBATCH --time=7:00:00
#SBATCH --mem=200GB
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=4
#SBATCH --workdir=/lustre/work/bahaabd/baha000/genomes_untrimmed_fastq/2018/group15
#SBATCH --job-name=group15

module load spades quast prokka python/2.7

combined_data=combined.quast.results.txt


while read r1 r2 output; do

spades.py -1 $r1 -2 $r2 -o $output
spades.py -1 $r1 -2 $r2 -o $output -t 4 --only-assembler

cd $output
quast.py contigs.fasta
prokka --genus Escherichia -usegenus contigs.fasta

cd ..
echo -e "$output\t$(tail -n 1 $output/quast_results/latest/transposed_report.tsv)" >> $combined_data

done < group15.txt

Thanks a lot. Baha

Assembly • 5.2k views
ADD COMMENT
0
Entering edit mode

You can easily post-filter the contigs file to eliminate contigs smaller than 200bp.

ADD REPLY
0
Entering edit mode

I am a beginner in this field. I really do not know how to postfilter contigs. Would you please tell me how? Highly appreciate it. Baha

ADD REPLY
0
Entering edit mode

You can use a separate program. One recommendation reformat.sh from BBMap suite. You would do something like

reformat.sh in=contigs.fasta out=filtered.fasta minlength=200
ADD REPLY

Login before adding your answer.

Traffic: 2515 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6