Created
November 29, 2012 17:18
-
-
Save radaniba/4170510 to your computer and use it in GitHub Desktop.
Get all UCSC refseq and calculate first intron length and normalized first intron length
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| BEGIN { | |
| FS="\t"; | |
| } | |
| { | |
| split($10,exonStarts,","); | |
| split($11,exonEnds,","); | |
| geneSize=1.0*int($6)-int($5); | |
| exonCount=int($9); | |
| if(exonCount<2) | |
| { | |
| next; | |
| } | |
| if($4=="+") | |
| { | |
| printf("%i\t%f\t%s\n",(exonStarts[2]-exonEnds[1]),(exonStarts[2]-exonEnds[1])/geneSize,$0); | |
| } | |
| else | |
| { | |
| printf("%i\t%f\t%s\n",(exonStarts[exonCount]-exonEnds[exonCount-1]),(exonStarts[exonCount]-exonEnds[exonCount-1])/geneSize,$0); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment