Question: set the minimum contig length in spades
0
gravatar for babdalhamid
10 months ago by
babdalhamid0 wrote:

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 • 698 views
ADD COMMENTlink modified 10 months ago by genomax77k • written 10 months ago by babdalhamid0

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

ADD REPLYlink written 10 months ago by genomax77k

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 REPLYlink written 10 months ago by babdalhamid0

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 REPLYlink written 10 months ago by genomax77k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1575 users visited in the last hour