R/getGeneSeq.R

Defines functions getGeneSeq

Documented in getGeneSeq

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 29, 2017, 11:04 a.m.