R/getGeneSeq.R

getGeneSeq <- function(chr, start, end, organism){
  # Options:
  # Organism: susScr3
  reply <- scan(paste("http://genome.ucsc.edu/cgi-bin/das/",organism,"/dna?segment=chr",chr,":",start,",",end,sep=""),what="raw")
  getStart <- which(grepl("length=",reply))+1
  getEnd <- which(grepl("/DNA",reply))-1
  paste(reply[getStart:getEnd],collapse="")
}

Try the hoardeR package in your browser

Any scripts or data that you put into this service are public.

hoardeR documentation built on May 2, 2019, 5:15 a.m.