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
| # 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 |
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
| # Code to see how focal loss changes as alpha and gamma are changed. | |
| # Load libraries | |
| import torch | |
| import torch.nn.functional as F | |
| # Define data to calculate focal loss | |
| # includes two correct predictions and two incorrect predictions |
OlderNewer