What? Sorry, I don't get it, again. samtools? Why samtools? That makes no sense! ;)
From genomic coordinate to Reference base
Hi, I have an extensive set of genomic coordinates (i.e. chr1:9071988) and I need to automatically get the reference (Human Genome hg19 ) base corresponding to that positions.
Could you provide me some hints to solve this issue please?
Thank you in advance!
• 4,185 views
•
link
3 answers
samtools faidx and some shell scripting should work.
• 0 views
•
link
• 0 views
•
link
Samtools can be used to extract subsequences from a fasta file. That's what the faidx command does.
• 0 views
•
link
You can try fastacmd.
Create DB (run this only once):
formatdb -i hg19.fa -o T -p F -V
Get nucleotide:
fastacmd -d hg19.fa -L 9071988,9071989 -s "chr1" (-S 2 if neg. Strang)
• 0 views
•
link
Log in to answer this question.
Thank you everybody for the useful comments and suggestions, really appreciated!
samtools faidxandbedtools getfastawork both perfectly for my purpose. Many thanks again!