This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Kallisto loop error

This error appears while doing a loop for the kallisto aligner " sed: -e expression #1, char 23: unknown option to `s' " and here is the loop:

for i in *.fastq; do SAMPLE=$(echo ${i}| sed "s/_1\.fastq/.kallisto//"); echo kallisto quant -i transcriptome.idx -o ${SAMPLE}_allign_1 -p ${SAMPLE}_allign_2 ${SAMPLE}_trim_1.fastq ${SAMPLE}_trim_2.fastq; done
kallisto

It looks like you've got an extra slash in your sed statement. Assuming that you want to replace "_1.fastq" with ".kallisto", then:

echo ${i}| sed "s/_1.fastq/.kallisto//"

should probably be:

echo ${i}| sed "s/_1.fastq/.kallisto/"

But is that what you're actually trying to do?

0 answers

No answers yet.

Log in to answer this question.