Created
June 22, 2022 12:57
-
-
Save ag1805x/d92e339cae1be334a921a72ef6d0959f to your computer and use it in GitHub Desktop.
This file contains 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
# Extract gene lengths from GTF file | |
# Download GTF file from https://gdc.cancer.gov/about-data/gdc-data-processing/gdc-reference-files | |
echo "Gene_ID, Gene_name, Gene_type, Chr, Start, End, Gene_length" > gdc_gencode_v36_annotation.csv | |
awk '{if($3 == "gene") print $0}' gencode.v36.annotation.gtf | awk -F '[\t ;]' '{print $10","$16","$13","$1","$4","$5","$5-$4}' >> gdc_gencode_v36_annotation.csv |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment