Entering edit mode
6.8 years ago
sneha108ss
▴
30
Hi,
I am trying to run this code
python dexseq_count.py -p yes -f bam -r pos Daphnia_annotation_result.gff Control.sorted.bam control.count.txt
and I get the following error:
ValueError: file has no sequences defined (mode='rb') - is it SAM/BAM format? Consider opening with check_sq=False.
Can you please tell me how to open the file with the check_sq=False option
Thanks
I'd first suggest you make sure that your bam file is a valid bam file. What does
samtools flagstat Control.sorted.bam
return?Hi,
I ran samtools flagstat and it returned the following:
I don't understand why everything is 0. The bam files are not empty.
Why do you think that?
I added markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:
Weird... what is the output of
samtools view Control.sorted.bam | head
?I really appreciate your help.
How did you align the FASTQ file?
The BAM data should look something like:
The alignment was done using STAR
The alignment section of the BAM file does look like what you have sent.
I see, Daphnia spp.? Are the contig / chromosome names in the BAM exactly the same as in the GFF?
It's very late here in Europe. Wouter already went to sleep, as am I... catch you in the morning.
As indicated by @Kevin you likely have a chromosome name mismatch in your GTF file and the genome you used for the alignments. Do you see things like
DAPPUscaffold_15334
in your GTF file? If you don't then that explains why you are getting 0 counts. Those two things need to match.Thank you so much for your help. The BAM files looked fine on my computer but when I uploaded it onto the cluster something went wrong. Anyways I tried uploading it again and now samtools flagstat control.sorted.bam gives the following output:
But when I run
samtools view control.sorted.bam | python dexseq_count.py -p yes -s yes -r pos Daphnia_annotation_result.gff - control.txt
I get the following error: