Hello,
Is there a way to get read depth for each nucleotide in the format A,C,G,T (any delimiter is okay) in every individual from the vcf file? Vcftools has utilities to get read depth for alleles at SNP sites summed for all individuals but I want it reported for each individual.
Example:
Chrom Pos Ref_allele Sample_1 Sample_2 .. Sample_n
Chr1 20 A 3,0,9,0 1,0,17,0 .. 0,0,7,0
I need the data to calculate LD. I tried using --hap-r2
but because the chromosomes in my reference genome are organized very messily (each chrom is split into thousands of small scaffolds), this isn't generating anything. I could lower the window size but then scanning for actual LD across the whole chromosome would be impacted.
I'd appreciate any help. Thanks.
Thanks Pierre. Looks like a great tool but I am having too many problems compiling it (issue with javac version). Setting both JAVA_HOME & PATH to 1.8.0 did not do it for me (
echo
shows correct version for both paths, i.e. 1.8.0). I'll give it another go later today/tomorrow and open an issue on github if I can't get it to work. Thanks again!if you find something wrong, feel free to submit an issue. But for now, the travis-ci is working fine.
Pierre,
The program runs fine but I am not getting the expected output as shown in your Sam2Tsv page under 'Example'. Here's my command:
java -jar dist/sam2tsv.jar sample.sam -r ref.dna.fa -o sample_nuc_count.txt
And here's the first 10 lines of the output:
I also got this on the terminal, but not sure if this is causing it:
Ignoring SAM validation error due to lenient parsing: Error parsing text SAM file. MAPQ should be 0 for unmapped read.; File sample.sam; Line 1260558
Thanks for your help.
I don't see anything wrong in the outpit
the message "Ignoring SAM validation" is just a warning. There is an error in your SAM file because there is an unmapped read having a mapping quality >0 (which is wrong).
Ah, my bad. The 'Qual' column threw me off here. Sorry. Thanks for the great tool!
cool. BTW, you can use a bam as well, or stdin. something like;
samtools view -bu your.bam TGACv1_scaffold_576745_7BL | java -jar sam2tsv.jar -r ref.dna.fa