Entering edit mode
6.5 years ago
tpaisie
▴
80
I have around 270 samples of Salmonella. I'm trying to use the program SSPACE to extend and scaffold pre-assembled contigs. Here is my set up of the library.txt file (with less samples):
SRR1122483 bowtie SRR1122483_pair_1.fastq SRR1122483_pair_2.fastq 200 0.75 FR
SRR1122484 bowtie SRR1122484_pair_1.fastq SRR1122484_pair_2.fastq 200 0.75 FR
SRR1122485 bowtie SRR1122485_pair_1.fastq SRR1122485_pair_2.fastq 200 0.75 FR
SRR1122486 bowtie SRR1122486_pair_1.fastq SRR1122486_pair_2.fastq 200 0.75 FR
SRR1122487 bowtie SRR1122487_pair_1.fastq SRR1122487_pair_2.fastq 200 0.75 FR
And here is my command for SSPACE:
DIR=$1
SSPACE.pl -l library.txt -s spades_output/${DIR}/contigs.fasta -x 1 -m 32 -o 20 -k 5 -a 0.70 -n 15 -p 0 -v 1 -z 200 -g 0 -T 6 -b ${DIR}
If anyone could help me find a way where I can run SSPACE on all the samples in my library.txt file without having to enter each sample separately it would be greatly appreciated. Thanks!!!
do you mean you want to build the file library.txt from a directory of fastq files ?
So I have my library.txt file already made with all the samples I want to run included in it, but I am unable to run all these samples at the same time or even sequentially. I have been having to do run this program one sample at a time. For example, I have to change my library.txt file to:
When I try to run SSPACE with more than one sample in the library.txt file, it will not run. For example a library.txt that looks like this:
I cannot get the program to run on both samples.
Hi tpaisie. Have you tried a bash script?
!/bin/bash
Immediately stop on errors. keep track of the commands as they get executed.
set -uex shopt -s extglob
Samples list.
array=( "SRR1299291" "SRR1292311" )
for i in ${array[@]} do ./SSPACE_Standard_v3.0.pl -l "$i"library.txt -s "$i"fasta_file -k 5 -a 0.7 \ -x 0 -b "$i"output_name
done