querying 5'UTR, first exon, and flanking sequences
2
0
Entering edit mode
9.3 years ago
2015rpro • 0

I am trying to help my PI with a project. He gave me a list of 2700 hgnc_ids and wants me to obtain the sequence of 1000 bases upstream of TSS of each of the 2700 genes, and the first exon of each gene, and the sequence of the 1000 bases downstream of the first exon(the intron).

I tried ensembl with BiomaRt with R bioconductor, however, I am only able to obtain the 1000 upstream flanking sequences and the exons, but ensembl does not have introns sequence function.

I also tried BioString and BSgenome but it seems I could only query one gene at a time and it didn't work with all 2700 genes at once.

Does any body know what I could do?

5-prime-utr exon introns • 3.1k views
ADD COMMENT
0
Entering edit mode
9.3 years ago

Another way could be,

  1. Download the whole gene coordinates from Biomart (for all 2700 genes).
  2. Repeat the same step but with exons as output.

Use subtractBed to fetch the intron list, using above two file (Gene-Exons)

So, now you have exon and intron co-ordinates, you could write small code in R/perl to do whatever you want (get the respective co-ordinates). Make sure, you whatever you do, do it strand specifically (if -ve strand, TSS and TTS are other way around).

Finally, if you want sequences (FASTA), use getFasta

HTH

ADD COMMENT
0
Entering edit mode
9.3 years ago
Tariq Daouda ▴ 220

Hi,

If you convert your hgnc_ids to ensembl ids using biomart and don't mind a bit of python, pyGeno allows you to do that quite easily by querying genes/transcripts/exons by ids. Here are some example snippets.

To get the 5' UTR of a transcript:

print trans.UTR5

To get the first exon:

print trans.exons[0].sequence

To get the flanking regions:

chro = trans.chromosome
exon = trans.exons[0]

print chro.getSequence(exon.start - 1000, exon.end + 1000)
ADD COMMENT

Login before adding your answer.

Traffic: 2516 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