genome-nlp
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.4%) to scientific vocabulary
Repository
Basic Info
- Host: GitHub
- Owner: CodelyUnicorn
- Language: Jupyter Notebook
- Default Branch: main
- Size: 63.4 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
Genome-NLP benchmark
Workflow Diagram :
Steps
1. Setting Up Dataset
- Downloaded the .FASTA file containing genomic sequence from the National Centre for Biotechnology Information (NCBI) FTP site.
- Utilized "Homo sapiens", the latest GRCh38 human genome assembly sequences for evaluation.
2. NLP Pre-processing
NLP aids in efficient pre-processing and extracting 'meaning' from human language data, facilitating better understanding and analysis in genomics. - Data Cleaning: Ensured each sequence identifier and its corresponding DNA sequence are correctly formatted. Removed any non-ATCG characters (DNA molecule: adenine (A), cytosine (C), guanine (G), and thymine (T)) or whitespace. - Case Conversion: Converted sequences to upper or lower case. - Normalization: Standardized the sequences to a common format or length if necessary. Removed any redundant or duplicate sequences. - Tokenization: Trained a SentencePiece tokenizer on the sequences. - Saving Tokenizer: Saved the trained tokenizer to a specified file.
3. Data Representation
- The dataset was divided into training (90%), testing (5%), and validation (5%).
4. Pre-Training BERT Model
- Utilized DNABERT tokenizer.
- Utilized GenomicBERT tokenizer.
For Pre-training GenomicBERT- following lines of codes were changed:
Changes to GenomicBERT pipeline to replace Sequence classification function with Foundation model building (Train.py)
- Change data collator function in Tyrone's code #138 to do Masking of tokens from transformers import DataCollatorForLanguageModeling
datacollator = DataCollatorForLanguageModeling( tokenizer=tokenizer, mlm=True, mlmprobability=0.15 )
- Change distilbert config; no need to mention numlabels, remove that. Line 223 config = DistilBertConfig( vocabsize=vocabsize, numlabels=2, #remove this line # outputhiddenstates=True, # output_attentions=True )
Change line 230,234 for model init..ideally all DistilBertForSequenceClassification to be replaced with DistilBertForMaskedLM model = DistilBertForMaskedLM(config=config)
#Change trainer line 302 : Can remove customized compute metrics function trainer = Trainer( modelinit=modelinit, tokenizer=tokeniser, args=argstrain, traindataset=dataset["train"], evaldataset=dataset["test"], computemetrics=computemetrics, #remove this line datacollator=data_collator, )
Can add Evaluation function to measure perplexity. Function readily available in Transformers Trainer function. import math evalresults = trainer.evaluate() print(f"Perplexity: {math.exp(evalresults['eval_loss']):.2f}")
Also comment out the following lines 161 to 163
by default this will be "labels"
if type(dataset[i].features[args.label_names[0]]) != ClassLabel:
#dataset[i] = dataset[i].class_encode_column(args.label_names[0])
5. Fine-tuning for Promoter and Non-Promoter Classification
By fine-tuning the pre-trained models on promoter and non-promoter datasets, the models learn to distinguish between these two types of sequences based on their features and patterns.
Acknowledgements
We extend our sincere gratitude to Dr. Ke Deng, our Academic Supervisor, for providing invaluable guidance and oversight throughout this journey. Additionally, we wish to express our appreciation to Dr. Sonika Tyagi, an Associate Professor of Digital Health and Bioinformatics at the School of Computational Technologies, RMIT University Australia, and an affiliate Machine Learning lead scientist at Central Clinical School, Monash University Australia. Dr. Tyagi's expertise in developing innovative machine learning tools and pipelines, and her application of these methods to address biological and clinical research questions, significantly contributed to the success of our project. Lastly, we extend our gratitude to all team members for their dedication, collaboration, and contributions to this project.
Owner
- Name: Sunita Verma
- Login: CodelyUnicorn
- Kind: user
- Repositories: 1
- Profile: https://github.com/CodelyUnicorn
Hi, I'm Sunita Verma - The AI Student 🤖📚. Welcome to my GitHub profile! I'm an enthusiastic AI student, constantly diving into the fascinating world AI.
GitHub Events
Total
Last Year
Dependencies
- datasets ==2.10.1
- furo *
- matplotlib ==3.5.2
- pandas ==1.4.2
- scikit-learn ==1.1.1
- scipy ==1.10.1
- screed ==1.0.5
- sphinx *
- tqdm ==4.64.0
- transformers ==4.23.0
- weightwatcher ==0.6.4
- datasets ==2.10.1
- gensim ==4.2.0
- hyperopt ==0.2.7
- libarchive ==3.6.2
- matplotlib ==3.5.2
- pandas ==1.4.2
- pytorch ==1.10.0
- ray ==1.13.0
- scikit-learn ==1.1.1
- scipy ==1.10.1
- screed ==1.0.5
- seaborn ==0.11.2
- sentencepiece ==0.1.96
- tabulate ==0.9.0
- tokenizers ==0.12.1
- tqdm ==4.64.0
- transformers ==4.23.0
- transformers-interpret ==0.8.1
- wandb ==0.13.4
- weightwatcher ==0.6.4
- xgboost ==1.7.1
- yellowbrick ==1.3.post1