Question: Prepare multiple gtf files for Ballgown
0
gravatar for catglen012
5 months ago by
catglen0120
catglen0120 wrote:

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?

hisat2 rna-seq hisat • 291 views
ADD COMMENTlink written 5 months ago by catglen0120
1

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
ADD REPLYlink written 5 months ago by h.mon23k

Thank you for your help!

ADD REPLYlink written 5 months ago by catglen0120
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: 1391 users visited in the last hour