Skip to content

Commit 8e76151

Browse files
authored
Merge pull request #21 from Adoni5/master
Delete filtering contigs on `_` in `--karyotype`
2 parents 0bb1f33 + 914bd09 commit 8e76151

File tree

3 files changed

+5
-7
lines changed

3 files changed

+5
-7
lines changed

Cargo.toml

-2
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,3 @@ libz-sys = "1.1.12"
3030
[dev-dependencies]
3131
ctor = "0.2.4"
3232

33-
[target.x86_64-apple-darwin]
34-
rustflags = ["-C", "link-arg=-mmacosx-version-min=10.12"]

config.toml

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[target.x86_64-apple-darwin]
2+
rustflags = ["-C", "link-arg=-mmacosx-version-min=10.12"]

src/karyotype.rs

+3-5
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,9 @@ pub fn make_karyotype(tids: &Vec<i32>, bamp: String) {
1414
let mut norm_count = vec![];
1515
for (tid, count) in tidcount.into_iter() {
1616
let chrom = std::str::from_utf8(head_view.tid2name(tid.try_into().unwrap())).unwrap();
17-
if !chrom.contains('_') {
18-
let chrom_length = head_view.target_len(tid.try_into().unwrap()).unwrap();
19-
chroms.push(chrom);
20-
norm_count.push((count as f32) / (chrom_length as f32));
21-
}
17+
let chrom_length = head_view.target_len(tid.try_into().unwrap()).unwrap();
18+
chroms.push(chrom);
19+
norm_count.push((count as f32) / (chrom_length as f32));
2220
}
2321
let median_count = crate::calculations::median_phaseblocks(norm_count.clone());
2422
let mut zipped = chroms.iter().zip(norm_count).collect::<Vec<_>>();

0 commit comments

Comments
 (0)