biomaRt getSequence through genomic position
1
0
Entering edit mode
Paul Hammer ▴ 220
@paul-hammer-2635
Last seen 9.6 years ago
hi all, i try to get sequences via the getSequence function from biomaRt. Exact i would like to have the last 5 bases of an exon and the last 5 bases of the following intron. my approach is following: library(biomaRt) ensembl_rat = useMart("ensembl", dataset="rnorvegicus_gene_ensembl") filter_rat = listFilters(ensembl_rat) rat_exonsLocs = getBM(attributes=c("ensembl_exon_id", "exon_chrom_start", "exon_chrom_end"), filter=filter_rat[c(14,45,12),1], values=list(chromosome="1", status="KNOWN", biotype="protein_coding"), mart=ensembl_rat) laenge = dim(rat_exonsLocs)[1] ensembl_rat2 = useMart("ensembl", dataset="rnorvegicus_gene_ensembl", mysql=TRUE) for(i in 1:laenge){ gseqs_exon = getSequence(chromosome = 1, start=rat_exonsLocs[i,3]-5, end = rat_exonsLocs[i,3], mart = ensembl_rat2) seqs_introns = getSequence(chromosome = 1, start=rat_exonsLocs[i+1,2]-5, end=rat_exonsLocs[i+1,2], mart = ensembl_rat2) } but i get always this error message: "Error in mysqlNewConnection(drv, ...) : RS-DBI driver: (??O?cannot allocate a new connection -- maximum of 16 connections already opened)" Is there a way to use useMart without mysql=TRUE to get sequences only via genomic position? when i connect without mysql=TRUE (useMart("ensembl", dataset="rnorvegicus_gene_ensembl") ) i always have to set seqType and type. when i do this i don't get the 5 bases that i want! any help would great! thanks in advance paul
biomaRt biomaRt • 931 views
ADD COMMENT
0
Entering edit mode
@wolfgang-huber-3550
Last seen 11 days ago
EMBL European Molecular Biology Laborat…
Dear Paul, and what is the output of sessionInfo()? bw Wolfgang Paul Hammer ha scritto: > hi all, > > i try to get sequences via the getSequence function from biomaRt. Exact > i would like to have the last 5 bases of an exon and the last 5 bases of > the following intron. my approach is following: > > library(biomaRt) > ensembl_rat = useMart("ensembl", dataset="rnorvegicus_gene_ensembl") > filter_rat = listFilters(ensembl_rat) > rat_exonsLocs = getBM(attributes=c("ensembl_exon_id", > "exon_chrom_start", "exon_chrom_end"), filter=filter_rat[c(14,45,12),1], > values=list(chromosome="1", status="KNOWN", biotype="protein_coding"), > mart=ensembl_rat) > laenge = dim(rat_exonsLocs)[1] > > ensembl_rat2 = useMart("ensembl", dataset="rnorvegicus_gene_ensembl", > mysql=TRUE) > for(i in 1:laenge){ > gseqs_exon = getSequence(chromosome = 1, start=rat_exonsLocs[i,3]-5, end > = rat_exonsLocs[i,3], mart = ensembl_rat2) > seqs_introns = getSequence(chromosome = 1, start=rat_exonsLocs[i+1,2]-5, > end=rat_exonsLocs[i+1,2], mart = ensembl_rat2) > } > > but i get always this error message: "Error in mysqlNewConnection(drv, > ...) : RS-DBI driver: (??O?cannot allocate a new connection -- maximum > of 16 connections already opened)" > > Is there a way to use useMart without mysql=TRUE to get sequences only > via genomic position? when i connect without mysql=TRUE > (useMart("ensembl", dataset="rnorvegicus_gene_ensembl") ) i always have > to set seqType and type. when i do this i don't get the 5 bases that i > want! > > any help would great! > thanks in advance > paul >
ADD COMMENT

Login before adding your answer.

Traffic: 860 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6