Hi Alex- I am not an expert in this. I was able to download file by going to the link below (I dont have wget function)
ftp://ftp.sanger.ac.uk/pub/gencode/Gencode_human/release_21/gencode.v21.annotation.gff3.gz
I unzipped it, I then installed BEDOPS and tried:
gff2bed --input=unzipd.gencode.v21.annotation.gff3 | awk '$8=="gene"' > genes.bed
However, it doesn't work. it gives me an empty genes.bed file. Further, I dont know how to get the hg19 version (as that's what my coordinates are). I google v21 and it seems to be hg39. I still didn't get to the bedmap step ....
No need to write code. This will do what you need: http://bedtools.readthedocs.org/en/latest/content/tools/intersect.html
oh nice, but what would my reference to intersect to be? That's the problem I can't find a file with "GeneID" "GeneName" Chromosome location.
You create one. See my answer.
Here is what I did:
I downloaded a reference file from UCSC hg19 and fixed columns to have this structure:
Then, I got my input file (which has the query locations) as such:
Then I used the command:
My understanding is that each row in the querrylist file will be intersected with the ensGene.txt. However, the output file had the same # of lines as ensGene (which is 3 x my query list) and did not get me the output of interest. I tried swathing
-aand-bbut that did not help.Any advice?
I double checked. my bad, the result is just a representation of multiple overlaps. I thought it just matches one to one. Thanks.