Question: Get the genes between certain chromosomal position
0
gravatar for akij
6 months ago by
akij60
akij60 wrote:

I know this is very common questions. But my input list is huge. So it would be nice if I can just input my whole list and output.

So I have a huge list of chromosomal positions in a excel file that looks like below. I want to find the genes between each start and end positions of chromosome.

chr       start          end        prob_no
1   196792690   196829513       36823
1   248572774   248633821       61047
2   41011303    41024125        12822
2   52516787    52554404        376176
3   189645889   189653199        7310
3   193160173   193165114        4941

How can I get the gene lists? It would be also nice if I could get the output like this

chr       start          end        prob_no  genes
1   196792690   196829513       36823      gene1, gene2.....
gene • 265 views
ADD COMMENTlink modified 6 months ago by Alex Reynolds21k • written 6 months ago by akij60

Hi akij,

If an answer was helpful you should upvote it, if the answer resolved your question you should mark it as accepted.

Cheers,
Wouter

ADD REPLYlink written 6 months ago by WouterDeCoster23k
1
gravatar for Alex Reynolds
6 months ago by
Alex Reynolds21k
Seattle, WA USA
Alex Reynolds21k wrote:

BEDOPS bedmap does exactly what you need, outputting results in the format you want:

$ bedmap --echo --echo-map-id-uniq positions.bed genes.bed > answer.bed

If you have gene annotations in GFF or GTF format, you can convert them via BEDOPS gff2bed or gtf2bed, e.g.:

$ bedmap --echo --echo-map-id-uniq positions.bed <(gff2bed < annotations.gff) > answer.bed

Or:

$ bedmap --echo --echo-map-id-uniq positions.bed <(gtf2bed < annotations.gtf) > answer.bed

The default criteria for mapping is one or more bases of overlap between reference and annotation intervals. Add --fraction-map 1 if you want only the gene annotations reported that map entirely within the reference interval.

ADD COMMENTlink modified 6 months ago • written 6 months ago by Alex Reynolds21k
0
gravatar for genomax
6 months ago by
genomax37k
United States
genomax37k wrote:

Take a look at bedtools intersect (documentation) that you can use with a GTF file for your genome (with the genes in it).

ADD COMMENTlink written 6 months ago by genomax37k
0
gravatar for Pierre Lindenbaum
6 months ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum101k wrote:

I have a huge list of chromosomal positions in a excel file

"huge" and "excel" are antinomic

have a look at the UCSC table browser to get the intersection with a gene track: https://genome.ucsc.edu/goldenPath/help/hgTablesHelp.html#SimpleIntersection

ADD COMMENTlink written 6 months ago by Pierre Lindenbaum101k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1089 users visited in the last hour