Prepare multiple gtf files for Ballgown
0
0
Entering edit mode
5.6 years ago
catglen012 ▴ 10

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 • 1.6k views
ADD COMMENT
1
Entering edit mode

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 REPLY
0
Entering edit mode

Thank you for your help!

ADD REPLY

Login before adding your answer.

Traffic: 2599 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6