Skip to content

Commit 70be6c5

Browse files
Merge pull request #119 from pangenome/more-pafs
Support more alignment files in input
2 parents 6f479c1 + cab7164 commit 70be6c5

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/impg.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ pub struct QueryMetadata {
8989
target_end: i32,
9090
query_start: i32,
9191
query_end: i32,
92-
paf_file_index: u16,
92+
paf_file_index: u32,
9393
strand_and_cigar_offset: u64, // Track strand and cigar offset
9494
cigar_bytes: usize,
9595
}
@@ -308,7 +308,7 @@ impl Impg {
308308
target_end: record.target_end as i32,
309309
query_start: record.query_start as i32,
310310
query_end: record.query_end as i32,
311-
paf_file_index: file_index as u16,
311+
paf_file_index: file_index as u32,
312312
strand_and_cigar_offset: record.strand_and_cigar_offset, // Already includes strand bit
313313
cigar_bytes: record.cigar_bytes,
314314
};

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,14 +1702,14 @@ fn resolve_paf_files(paf: &PafOpts) -> io::Result<Vec<String>> {
17021702
));
17031703
};
17041704

1705-
// Check if the number of PAF files exceeds u16::MAX
1706-
if paf_files.len() > u16::MAX as usize {
1705+
// Check if the number of PAF files exceeds u32::MAX
1706+
if paf_files.len() > u32::MAX as usize {
17071707
return Err(io::Error::new(
17081708
io::ErrorKind::InvalidInput,
17091709
format!(
17101710
"Too many PAF files specified: {} (maximum allowed: {})",
17111711
paf_files.len(),
1712-
u16::MAX
1712+
u32::MAX
17131713
),
17141714
));
17151715
}

0 commit comments

Comments
 (0)