This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error While Running Cuffdiff On Multiple Bam Files Of A Group

Hi,

I'm trying to run cuffdiff on 6 samples, divided into two groups of 3 samples each - G1(Female), G2(Male). But, it does not run. I gave the following command:

cuffdiff /refs/mm9/Annotation/Genes/genes.gtf -L G1,G2 ~/Female/sampleA/accepted_hits.bam,~/Female/sampleC/accepted_hits.bam,~/Female/sampleE/accepted_hits.bam ~/Male/sampleG/accepted_hits.bam,~/Male/sampleI/accepted_hits.bam,~/Male/sampleK/accepted_hits.bam

I get this error:

You are using Cufflinks v2.1.1, which is the most recent release.
open: No such file or directory
File ~/Female/sampleC/accepted_hits.bam doesn't appear to be a valid BAM file, trying SAM...
Error: cannot open alignment file ~/Female/sampleC/accepted_hits.bam for reading

I have generated these BAM files using tophat2. They are mouse genome. But they seem to work when I give single bam file of the same group. Like the following command.

cuffdiff /refs/mm9/Annotation/Genes/genes.gtf -L G1,G2 ~/Female/sampleA/accepted_hits.bam ~/Male/sampleG/accepted_hits.bam

Can anyone tell me how to run multiple bam files of a group on cuffdiff?

cuffdiff tophat2 rna-seq

1 answer

replace '~' by ${HOME}.

$ echo A,~/B
A,~/B

$ echo A,${HOME}/B
A,/home/lindenb/B

That worked. Thanks! But out of curiosity, can you explain why that works?

That helped. Thanks again!

Log in to answer this question.