Hello,
I just aligned my first piece of RNA-Seq data and have a .bam file. I'd like to make a file of counts corresponding to genes that I can use in DESeq2. I downloaded a list of all genes from the UCSC gene browser and saved it as a .bam file. I'm trying to do the following:
bedtools multicov -bams UCSC_knownGene.bam -bed myData_out/accepted_hits.bam
But then I get this error:
Could not open input BAM files.
I've only read about this error on forums where people are using multiple bam files, so I'm not sure why I'm getting it if I'm only submitting one file that was directly downloaded from UCSC Genome Browser. Has anyone had a similar issue? Is there a better way to get .bam files to use for this?
Thank you!
Your list of genes should be in bed format.
https://genome.ucsc.edu/FAQ/FAQformat.html#format1
Also is your bam file indexed? Use
samtools index
to index your bam fileNot sure it was indexed - thank you!
Try:
it will probably say "ASCII text". If it a text file, then do:
If unsure, post here the result of head. Bam files should be gzipped. I suspect the file you downloaded gene list is either bed (as Varun Gupta pointed out) or gtf format.