sequence retrieval in R using fasta file
I have a Hg19.fasta file and I have a csv file which contains the genomic coordinates of all 23 chromosomes which the sequence is to be retrieved. How can I do it using R?
• 3,458 views
•
link
1 answer
You could use the R package seqinr to read the FASTA file with read.fasta(), read the csv file with read.csv() then subset the sequence using the coordinates. There may also be something for you in the Bioconductor GenomicRanges package.
• 0 views
•
link
Log in to answer this question.
Not what you ask for, but
bedtools getfastawould be the way to do this if you wouldn't constrain to R.