Skip to main content

MafRecord

Struct MafRecord 

Source
pub struct MafRecord {
Show 36 fields pub hugo_symbol: String, pub entrez_gene_id: Option<u32>, pub center: String, pub ncbi_build: String, pub chromosome: String, pub start_position: u64, pub end_position: u64, pub strand: String, pub variant_classification: String, pub variant_type: String, pub reference_allele: String, pub tumor_seq_allele1: String, pub tumor_seq_allele2: String, pub dbsnp_rs: Option<String>, pub dbsnp_val_status: Option<String>, pub tumor_sample_barcode: String, pub matched_norm_sample_barcode: Option<String>, pub validation_status: Option<String>, pub mutation_status: String, pub sequence_source: String, pub sequencer: Option<String>, pub hgvsc: Option<String>, pub hgvsp: Option<String>, pub hgvsp_short: Option<String>, pub transcript_id: Option<String>, pub exon_number: Option<String>, pub t_depth: Option<u32>, pub t_ref_count: Option<u32>, pub t_alt_count: Option<u32>, pub n_depth: Option<u32>, pub n_ref_count: Option<u32>, pub n_alt_count: Option<u32>, pub filter_status: String, pub qual: Option<f64>, pub vaf: Option<f32>, pub protein_position: Option<String>,
}

Fields§

§hugo_symbol: String§entrez_gene_id: Option<u32>§center: String§ncbi_build: String§chromosome: String§start_position: u64§end_position: u64§strand: String§variant_classification: String§variant_type: String§reference_allele: String§tumor_seq_allele1: String§tumor_seq_allele2: String§dbsnp_rs: Option<String>§dbsnp_val_status: Option<String>§tumor_sample_barcode: String§matched_norm_sample_barcode: Option<String>§validation_status: Option<String>§mutation_status: String§sequence_source: String§sequencer: Option<String>§hgvsc: Option<String>§hgvsp: Option<String>§hgvsp_short: Option<String>§transcript_id: Option<String>§exon_number: Option<String>§t_depth: Option<u32>§t_ref_count: Option<u32>§t_alt_count: Option<u32>§n_depth: Option<u32>§n_ref_count: Option<u32>§n_alt_count: Option<u32>§filter_status: String§qual: Option<f64>§vaf: Option<f32>§protein_position: Option<String>

Implementations§

Source§

impl MafRecord

Source

pub fn from_reformatted_record_for_samples( record: &ReformattedVcfRecord, center: &str, ncbi_build: &str, sample_barcode: &str, tumor: Option<&str>, normal: Option<&str>, ) -> Result<Self, Box<dyn Error>>

Convert a single-ALT record to a MAF row, reading the depth columns from explicitly named samples. tumor is the sample the t_* columns describe; normal populates the matched-normal columns. Passing None for either keeps the historical behaviour of using the first sample that declares DP.

Source

pub fn is_symbolic_allele(alt: &str) -> bool

A VCF ALT that is not a literal base sequence: a symbolic allele (<DEL>, <NON_REF>, <*>) or a breakend (A[chr2:456[, ]chr2:456]A). No MAF column can hold one — before 2026-09-09 <DEL> came out typed INS, an insertion of the five characters <DEL> — so such an allele produces no MAF row at all. The TSV path still carries it verbatim.

* (spanning deletion) is deliberately not included: vcf2maf drops those lines and we keep them, user’s call 2026-09-09.

Source

pub fn from_reformatted_record_multi_for_samples( record: &ReformattedVcfRecord, center: &str, ncbi_build: &str, sample_barcode: &str, tumor: Option<&str>, normal: Option<&str>, ) -> Result<Vec<Self>, Box<dyn Error>>

One MAF row per alternate allele, with the depth columns read from explicitly named tumor and normal samples.

Source

pub fn effect_priority(term: &str) -> u8

Source

pub fn resolve_one_consequence(consequence: &str) -> String

Resolve a (possibly &/,/|-joined) multi-term consequence string down to the single most severe term, mirroring vcf2maf’s sort-by-priority-then-take-first.

Source

pub fn get_maf_headers() -> Vec<String>

Source

pub fn to_tsv_line(&self) -> String

Trait Implementations§

Source§

impl Clone for MafRecord

Source§

fn clone(&self) -> MafRecord

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for MafRecord

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for MafRecord

Source§

fn eq(&self, other: &MafRecord) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for MafRecord

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Allocation for T
where T: RefUnwindSafe + Send + Sync,

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.