Closed Jolleboll closed 2 years ago
This happens if samtools doesn't find any reads in your bam. What do you get if you put a
samtools view "$out"/exphout_"${sample}"_realigned.sorted.bam chr4:39350044-39350099
in your script? Do you get output?
That command returns an error, but if I remove the "chr" in "chr4", like so (expanded the variables for testing):
samtools view ../output/exphout_62670396_S1_realigned.sorted.bam "4:39350044-39350099"
I get a bunch of reads.
The error I get when using the command you wrote goes like:
[main_samview] region "chr4:39350044-39350099" specifies an invalid region or unknown reference. Continue anyway.
Does that make sense? The chromosome names in my reference fasta are in the chr1, chr2, ..., chrX, chrY, chrM format.
If I change the names of the chromosomes in my reference fasta from e.g. 'chr4' to just '4', I get a little further:
REViewer now parsing 62670396_S1.
[2022-03-28 11:08:45.778] [info] Loading specification of locus RFC1
[2022-03-28 11:08:45.780] [info] Extracted 246 frags
[2022-03-28 11:08:45.780] [info] Calculating fragment length
[2022-03-28 11:08:45.780] [info] Fragment length is estimated to be 340
[2022-03-28 11:08:45.780] [info] Extracting genotype paths
[2022-03-28 11:08:45.783] [error] Unable to open file exphout_62670396_S1.vcf
I've no idea why the vcf can't be opened. It is readable by everyone, in a folder accessible by everyone. It has one entry:
#CHROM POS ID REF ALT QUAL FILTER INFO FORMAT 62670396_S1
4 39350044 . A <STR10>,<STR65> . PASS END=39350099;REF=11;RL=55;RU=AARRG;VARID=RFC1;REPID=RFC1 GT:SO:REPCN:REPCI:ADSP:ADFL:ADIR:LC 1/2:SPANNING/INREPEAT:10/65:10-10/53-102:11/0:20/33:0/17:41.513514
Sorry to be a bother. :smile:
And I still get output with the samtools view command you suggested (after changing chr4 to 4).
That error happens before REViewer sees any of the contents of the VCF file, so for some reason it's completely unable to open it. If this were my project, I'd guess it was a typo somewhere in the VCF name—could you paste an ls -al
of the folder you're running this in? Maybe a fresh eye can spot something.
Thank you so much sclamons. I goofed real bad, I used the basename of the vcf file, rather than the relative path to it, when running REViewer... ugh. Well, everything seems to work now. Thanks again :-]
Hello, I keep getting this error, I've tried with three different loci, the error remains the same.
I thought maybe the problem was that there are no InrepeatReads, but the problem remains if only using an entry where all three read categories have members, e.g:
[2022-03-25 14:42:00.258] [info] Loading specification of locus RFC1 [2022-03-25 14:42:00.260] [error] Failed to extract reads from the specified region
What to do? :-(
Grateful for help with this! Am excited to see the pretty diagrams...