This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Prepare multiple gtf files for Ballgown

Hello!

I want to run the following on my terminal:

stringtie -e -B -p 8 -G stringtie_merged.gtf -o ballgown/ERR188044/ERR188044_chrX.gtf map/ERR188044_chrX.bam
stringtie -e -B -p 8 -G stringtie_merged.gtf -o ballgown/ERR188104/ERR188104_chrX.gtf map/ERR188104_chrX.bam

but I have many different samples which means many different directories and gtf files which I need to create.

I was wondering if there is a way to create a batch loop that will allow me to do this for the many files that I need to prepare for Ballgown?

rna-seq hisat2 hisat

I am pretty sure there is a way to create a loop, but in general I know how my files are organized and named; and I have only a slight hint of how your files are organized and named. Maybe this can help you get started:

for i in map/*.bam
do
    sample=$(basename ${i%%._chrX.bam})
    echo "ballgown/$sample/${sample}_chrX.gtf"
done

0 answers

No answers yet.

Log in to answer this question.