Cufflink on multiple bam files
1
0
Entering edit mode
8.2 years ago
1769mkc ★ 1.2k

Im using tophat protocol so now my step one is done I have set of 4 bamfles.Now according to the protocol the next step is to run the cufflinks using the generated bam files , how can I run cufflinks from multiple bam files ,can anyone help me how do I do that ?Im not sure if its going to reduce my execution time or not but it will help me to do other stuff at the same time I suppose .

RNA-Seq • 3.6k views
ADD COMMENT
1
Entering edit mode

Those 6 are from the same sample or multiple samples?

ADD REPLY
0
Entering edit mode

Sorry its 4 bam files , my mistake, so Sample 1 and its replicate which is control and Sample 2 and its replicate which is my test sample. so in total i have 4 bam files

ADD REPLY
1
Entering edit mode
8.2 years ago

Run cufflinks separately on each of the 4 BAM files and feed the results into cuffMerge.

ADD COMMENT
0
Entering edit mode

finally i did that ,but is there a way we can out that into a shell script and automate the whole thing ?

ADD REPLY
1
Entering edit mode
for bamfile in *.bam
do
cufflinks $bamfile etc etc etc #do stuff
done
ADD REPLY
0
Entering edit mode

this looks really simple but i have to give output directory into it , how can i specify that in the script all together ? as I want them to go into different output folders

ADD REPLY
1
Entering edit mode
for bamfile in *.bam
do
cufflinks $bamfile -o ${bamfile%.*} etc etc etc #do stuff
done

Note that I don't know if you need the -o flag, just a guess. But ${filename%.*} removes the extension of variable $filename. Check it for yourself using echo first:

for bamfile in *.bam
do
echo cufflinks $bamfile -o ${bamfile%.*} etc etc etc #do stuff
done
ADD REPLY
0
Entering edit mode

thank you very much i will give it a try and let know if I have issues with it.

ADD REPLY

Login before adding your answer.

Traffic: 1186 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