use std::hash::Hash;
use crate::general::DbTag;
use crate::seqfeat::{BioSource, GeneRef, ProtRef, RnaRef};
use crate::seqloc::SeqLoc;
#[allow(non_snake_case)]
pub enum GeneType {
Unknown,
TRNA,
RRNA,
SnRNA,
ScRNA,
SnoRNA,
ProteinCoding,
Pseudo,
Transposon,
MiscRNA,
NcRNA,
BiologicalRegion,
Other
}
pub struct EntrezGene {
track_info: Option<Vec<GeneTrack>>,
r#type: GeneType,
source: BioSource,
gene: GeneRef,
prot: Option<ProtRef>,
rna: Option<RnaRef>,
summary: Option<String>,
location: Vec<(u64, u64)>,
gene_source: Option<Vec<GeneSource>>,
locus: Option<Vec<GeneCommentary>>,
properties: Option<Vec<GeneCommentary>>,
homology: Option<Vec<GeneCommentary>>,
comments: Option<Vec<GeneCommentary>>,
unique_keys: Option<Vec<DbTag>>,
xtra_index_terms: Option<Vec<String>>,
xtra_properties: Option<Vec<XtraTerms>>,
xtra_iq: Option<Vec<XtraTerms>>,
non_unique_keys: Option<Vec<DbTag>>,
}
pub type GeneSet = Vec<EntrezGene>;
#[derive(Default)]
pub enum GeneStatus {
#[default]
Live,
Secondary,
Discontinued
}
pub struct GeneTrack {
geneid: u64,
status: GeneStatus,
current_id: Option<Vec<DbTag>>,
create_date: u64,
update_date: u64,
discontinued_date: Option<u64>
}
#[derive(Default)]
pub struct GeneSource {
src: String,
src_int: Option<i64>,
src_str1: Option<String>,
src_str2: Option<String>,
gene_display: bool,
locus_display: bool,
extra_terms: bool,
}
#[allow(non_camel_case_types)]
pub enum GeneCommentaryType {
Genomic,
PreRNA,
mRNA,
rRNA,
tRNA,
snRNA,
scRNA,
Peptide,
OtherGenetic,
Genomic_mRNA,
cRNA,
MaturePeptide,
PreProtein,
MiscRNA,
snoRNA,
Property,
Reference,
Generif,
Phenotype,
Complex,
Compound,
ncRNA,
GeneGroup,
Assembly,
AssemblyUnit,
CRegion,
DSegment,
JSegment,
VSegment,
Comment,
Other,
}
pub struct GeneCommentary {
r#type: GeneCommentaryType,
heading: Option<String>,
label: Option<String>,
text: Option<String>,
accession: Option<String>,
version: Option<u64>,
xtra_properties: Option<Vec<XtraTerms>>,
refs: Option<Vec<Pub>>,
source: Option<Vec<OtherSource>>,
genomic_coords: Option<Vec<SeqLoc>>,
seqs: Option<VEc<SeqLoc>>,
products: Option<Vec<Self>>,
properties: Option<Vec<Self>>,
comment: Option<Vec<Self>>,
create_date: Option<u64>,
update_date: Option<u64>,
rna: Option<RNARef>,
}
pub struct OtherSource {
src: Option<DbTag>,
pre_text: Option<String>,
anchor: Option<String>,
url: Option<String>,
post_text: Option<String>,
}
#[allow(non_camel_case_types)]
pub enum MapType {
Cyto,
bp,
cM,
cR,
Min,
}
pub enum MapMethod {
Proxy(String),
MapType(MapType),
}
pub struct Map {
display_str: String,
method: MapMethod,
}
pub struct XtraTerms {
tag: String,
value: String
}