Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
b8ba281
feat(params): accept --limitGenomeGenerateRAM for STAR CLI compatibility
pinin4fjords May 12, 2026
8589859
fix(chimeric): create output parent directory before writing
pinin4fjords May 12, 2026
b501420
fix(bam): subtract Phred+33 offset from QUAL before writing to BAM
pinin4fjords May 12, 2026
27e3da1
fix(transcriptome-bam): write per-record RG:Z: tag matching @RG header
pinin4fjords May 12, 2026
ed59a6c
feat(bam): populate @PG header with PN/VN/CL fields
pinin4fjords May 12, 2026
9a7be3e
chore(params): trim verbose doc comment
pinin4fjords May 12, 2026
176a94c
chore(chimeric): remove narrative test comment
pinin4fjords May 12, 2026
586f206
chore(bam): remove narrative inline comment
pinin4fjords May 12, 2026
5930c04
chore(transcriptome-bam): remove narrative comments
pinin4fjords May 12, 2026
0e49edd
chore(bam): remove narrative comments
pinin4fjords May 12, 2026
8ffaddd
fix(transcriptome-bam): populate mate fields on paired-end records
pinin4fjords May 12, 2026
aa05ad0
fix(bam): emit SAM-spec NM:i: tag distinct from STAR-internal nM:i:
pinin4fjords May 12, 2026
d4a382b
feat(bam): emit XS:A: strand tag when --outSAMstrandField intronMotif
pinin4fjords May 12, 2026
1a55cae
feat(output): emit Log.out, Log.progress.out, _STARpass1/SJ.out.tab
pinin4fjords May 12, 2026
6724959
fix(sjdb): key SpliceJunctionDb in genome-absolute 0-based coordinates
pinin4fjords May 12, 2026
e91433a
revert(stats): drop Log.out / Log.progress.out stub writers
pinin4fjords May 12, 2026
cc3e48a
chore(params): warn at runtime when --limitGenomeGenerateRAM is set
pinin4fjords May 12, 2026
ac09650
fix(sjdb): off-by-one on stitch-time acceptor coordinate
pinin4fjords May 12, 2026
abf856e
fix: decode Gsj-region SA hits into split splice seeds
pinin4fjords May 12, 2026
e09748b
fix(stitch): use sjdb_score in place of motif_score on annotated junc…
pinin4fjords May 12, 2026
6165b22
fix(score): score_annotated_junction helper uses replacement not addi…
pinin4fjords May 12, 2026
0ab80c5
fix(stats): route reads exceeding --outFilterMultimapNmax to too_many…
pinin4fjords May 12, 2026
3f0377e
refactor(stats): drop redundant n_for_mapq conditional in PE caller
pinin4fjords May 12, 2026
4784bd0
Merge branch 'main' into pr/pinin4fjords/51
flying-sheep May 16, 2026
0ab761f
Merge branch 'main' into pr/pinin4fjords/45
flying-sheep May 16, 2026
aaa44de
Merge branch 'main' into pr/pinin4fjords/42
flying-sheep May 16, 2026
94f7e78
Merge branch 'main' into pr/pinin4fjords/41
flying-sheep May 16, 2026
c2967b0
Merge branch 'main' into pr/pinin4fjords/37
flying-sheep May 16, 2026
3fa407e
Merge branch 'main' into fix/chim-parent-dir-create
flying-sheep May 16, 2026
4bb2803
Merge branch 'main' into pr/pinin4fjords/41
flying-sheep May 16, 2026
ee0bfee
Merge branch 'main' into pr/pinin4fjords/43
flying-sheep May 16, 2026
e5e7790
Merge branch 'main' into pr/pinin4fjords/44
flying-sheep May 16, 2026
2b206d1
fix test
flying-sheep May 16, 2026
8ef5e57
Merge branch 'main' into pr/pinin4fjords/36
flying-sheep May 17, 2026
7134337
Merge branch 'main' into fix/pg-header-content
flying-sheep May 17, 2026
5c08c3c
Merge branch 'main' into fix/xs-strand-tag
flying-sheep May 17, 2026
a729801
upstream changes
flying-sheep May 17, 2026
d177215
chore: switch sam attributes to bitflags
flying-sheep May 17, 2026
48d1c13
Merge remote-tracking branch 'pinin4fjords/fix/limit-genome-generate-…
Psy-Fer May 29, 2026
14923ba
Extend PR #36 for human readable ram entries, like 64G
Psy-Fer May 29, 2026
fedadac
Merge remote-tracking branch 'pinin4fjords/fix/chim-parent-dir-create…
Psy-Fer May 29, 2026
1f178f3
Merge remote-tracking branch 'pinin4fjords/fix/output-shape-gaps' int…
Psy-Fer May 29, 2026
0bc5f0b
Merge remote-tracking branch 'pinin4fjords/fix/too-many-loci-accounti…
Psy-Fer May 29, 2026
9f41744
Merge remote-tracking branch 'pinin4fjords/fix/bam-qual-phred-offset'…
Psy-Fer May 29, 2026
cc00dff
Merge remote-tracking branch 'pinin4fjords/fix/nm-tag-sam-spec' into …
Psy-Fer May 29, 2026
0275cac
Merge remote-tracking branch 'pinin4fjords/fix/pg-header-content' int…
Psy-Fer May 29, 2026
8e5be3b
Merge remote-tracking branch 'pinin4fjords/fix/sjdb-coord-space' into…
Psy-Fer May 29, 2026
ebd3623
Merge remote-tracking branch 'pinin4fjords/fix/sjdb-replacement-not-a…
Psy-Fer May 29, 2026
67086b5
Merge remote-tracking branch 'pinin4fjords/fix/pass1-sjdb-seeding' in…
Psy-Fer May 29, 2026
3194c97
add missing n_genome_real for #51
Psy-Fer May 29, 2026
0fe9b08
Merge remote-tracking branch 'pinin4fjords/fix/xs-strand-tag' into in…
Psy-Fer May 29, 2026
a47ddda
Merge remote-tracking branch 'pinin4fjords/fix/transcriptome-rg-tag' …
Psy-Fer May 29, 2026
74ebfde
Fix CigarOp to cigar::op::new
Psy-Fer May 29, 2026
98684f8
Merge remote-tracking branch 'pinin4fjords/fix/transcriptome-mate-fie…
Psy-Fer May 29, 2026
188fe68
Merge remote-tracking branch 'origin/pa/sam-tags' into integration/pr…
Psy-Fer May 29, 2026
baf11e4
fmt fix
Psy-Fer May 29, 2026
8c8eb24
Update run_tests.sh
Psy-Fer May 29, 2026
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
29 changes: 6 additions & 23 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ dashmap = "6"
chrono = "0.4"
rand = "0.10"
tempfile = "3"
bitflags = { version = "2.11.1", features = ["std"] }

[dev-dependencies]
assert_cmd = "2"
Expand Down
7 changes: 5 additions & 2 deletions src/align/read_align.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1065,10 +1065,11 @@ pub fn align_paired_read(

// Step 3: TooManyLoci check (post-dedup, matching STAR's ordering: multMapSelect → dedup → TooManyLoci).
if joint_pairs.len() > params.out_filter_multimap_nmax as usize {
let n_loci = joint_pairs.len();
return Ok((
Vec::new(),
pe_chimeric,
0,
n_loci,
Some(UnmappedReason::TooManyLoci),
));
}
Expand Down Expand Up @@ -1336,7 +1337,7 @@ fn check_proper_pair(
}

/// Calculate signed insert size (TLEN)
fn calculate_insert_size(mate1_trans: &Transcript, mate2_trans: &Transcript) -> i32 {
pub(crate) fn calculate_insert_size(mate1_trans: &Transcript, mate2_trans: &Transcript) -> i32 {
// STAR outSAMtlen=1 (default): tlen is computed from the combined PE transcript span,
// not from max/min of individual mate endpoints.
//
Expand Down Expand Up @@ -1498,6 +1499,7 @@ mod tests {
let genome = Genome {
sequence,
n_genome,
n_genome_real: n_genome,
n_chr_real: 1,
chr_name: vec!["chr1".to_string()],
chr_length: vec![10],
Expand Down Expand Up @@ -1528,6 +1530,7 @@ mod tests {
junction_db: crate::junction::SpliceJunctionDb::empty(),
transcriptome: None,
prepared_junctions: Vec::new(),
sjdb_overhang: 0,
}
}

Expand Down
21 changes: 6 additions & 15 deletions src/align/score.rs
Original file line number Diff line number Diff line change
Expand Up @@ -126,19 +126,12 @@ impl AlignmentScorer {
((genomic_span as f64).log2() * self.score_genomic_length_log2_scale - 0.5).ceil() as i32
}

/// Apply annotation bonus to junction score
///
/// # Arguments
/// * `base_score` - Base score from motif
/// * `annotated` - Whether the junction is annotated in GTF
///
/// # Returns
/// Adjusted score with annotation bonus applied
pub fn score_annotated_junction(&self, base_score: i32, annotated: bool) -> i32 {
/// Annotated junctions score `sjdb_score`; unannotated junctions score `motif_score`.
pub fn score_annotated_junction(&self, motif_score: i32, annotated: bool) -> i32 {
if annotated {
base_score + self.sjdb_score
self.sjdb_score
} else {
base_score
motif_score
}
}

Expand Down Expand Up @@ -643,6 +636,7 @@ mod tests {
Genome {
sequence,
n_genome,
n_genome_real: n_genome,
n_chr_real: 1,
chr_name: vec!["chr1".to_string()],
chr_length: vec![seq.len() as u64],
Expand Down Expand Up @@ -965,17 +959,14 @@ mod tests {
out_filter_score_min_over_lread: 0.66,
};

// Annotated junction should get bonus
let annotated_score = scorer.score_annotated_junction(0, true);
assert_eq!(annotated_score, 2);

// Novel junction should not get bonus
let novel_score = scorer.score_annotated_junction(0, false);
assert_eq!(novel_score, 0);

// Bonus applies to any base score
let annotated_noncanon = scorer.score_annotated_junction(-8, true);
assert_eq!(annotated_noncanon, -6); // -8 + 2
assert_eq!(annotated_noncanon, 2);
}

#[test]
Expand Down
Loading
Loading