finally i did that ,but is there a way we can out that into a shell script and automate the whole thing ?
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 .
1 answer
Run cufflinks separately on each of the 4 BAM files and feed the results into cuffMerge.
for bamfile in *.bam
do
cufflinks $bamfile etc etc etc #do stuff
done
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
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
thank you very much i will give it a try and let know if I have issues with it.
Log in to answer this question.
Those 6 are from the same sample or multiple samples?
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