1from transformers import pipeline
2
3pipe = pipeline(
4 task="dnabert2-exon-intron-classification",
5 model="GustavoHCruz/ExInDNABERT2",
6 trust_remote_code=True,
7)
8
9out = pipe(
10 "GCAGCAACAGTGCCCAGGGCTCTGATGAGTCTCTCATCACTTGTAAAG"
11)
12
13print(out) # EXON
This model uses the same maximum context length as the standard DNABERT2 (512 tokens), but it was trained on DNA sequences of up to 256 nucleotides.
The pipeline will automatically truncate the nucleotide sequence they exceed this limit.
The model expects the same tokens as DNABERT2, ou seja, nucleotídeos de entrada, como por exemplo
The model should predict the class label: 0 (Intron) or 1 (Exon).
The model was trained on a processed version of GenBank sequences spanning multiple species, available at the
DNA Coding Regions Dataset.