Hi Pirerre,
That totally makes sense. Thank you so much.
Best
• 0 views
•
link
Hi,
I am interested in learning more about the first introns of UCSC gene or RefSeq gene in the UCSC genome browser. However, there doesn't seem to be a way to extract only the first intron data in bed file format. I understand that I can get exons or introns using table browser but it does not seem to have an option to only look at all the first introns of the genes. Has anyone figured out a way to approach it? Thanks a lot.
Best,
if I'm not wrong, this should do the job:
wget -O - -q "http://hgdownload.cse.ucsc.edu/goldenpath/hg19/database/refGene.txt.gz" | \
gunzip -c |\
awk -F '\t' '{nEx=int($9);if(nEx==1)next;split($10,S,/,/);split($11,E,/,/);printf("%s\t%d\t%d\t%s\n",$2,($4=="-"?E[nEx-1]:E[1]),($4=="-"?S[nEx]-1:S[2]),$2);}'
Log in to answer this question.