Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rendered_glycans.html

Large diffs are not rendered by default.

14 changes: 11 additions & 3 deletions rustyms-generate-imgt/src/structs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::str::FromStr;

use crate::imgt_gene::IMGTGene;
use crate::shared::{AnnotatedSequence, Gene, Species};
use rustyms::AminoAcid;
use rustyms::{AminoAcid, IsAminoAcid};

#[derive(Debug)]
pub struct DataItem {
Expand Down Expand Up @@ -57,7 +57,12 @@ impl Display for Region {
// self.found_seq.0,
self.found_seq
.as_ref()
.map(|seq| seq.1 .0.iter().map(|a| a.char()).collect::<String>())
.map(|seq| seq
.1
.0
.iter()
.map(|a| a.pro_forma_definition())
.collect::<String>())
.unwrap_or_else(|e| format!("<NO SEQ!>: {e}")),
)
}
Expand Down Expand Up @@ -237,7 +242,10 @@ impl std::fmt::Debug for AASequence {
write!(
f,
"[{}]",
self.0.iter().map(|a| a.char()).collect::<String>()
self.0
.iter()
.map(|a| a.pro_forma_definition())
.collect::<String>()
)
}
}
Expand Down
6 changes: 3 additions & 3 deletions rustyms-py/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::num::NonZeroU16;
use ordered_float::OrderedFloat;
use pyo3::{exceptions::PyValueError, prelude::*, types::PyType};

use rustyms::{AnnotatableSpectrum, Chemical, Linked, MultiChemical};
use rustyms::{AnnotatableSpectrum, Chemical, IsAminoAcid, Linked, MultiChemical};

/// Mass mode enum.
#[pyclass(eq, eq_int)]
Expand Down Expand Up @@ -440,7 +440,7 @@ impl AminoAcid {
}

fn __str__(&self) -> String {
self.0.char().to_string()
self.0.pro_forma_definition().to_string()
}

fn __repr__(&self) -> String {
Expand Down Expand Up @@ -1124,7 +1124,7 @@ impl Peptidoform {
self.0
.sequence()
.iter()
.map(|x| x.aminoacid.char())
.map(|x| x.aminoacid.pro_forma_definition())
.collect()
}

Expand Down
2 changes: 1 addition & 1 deletion rustyms/src/align/multi_alignment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl<Complexity> MultiAlignmentLine<'_, Complexity> {
{
print!(
"{}{}",
piece.1.aminoacid.char(),
piece.1.aminoacid,
"·".repeat(piece.0.step as usize - 1)
);
}
Expand Down
Loading
Loading