Created
June 2, 2023 15:49
-
-
Save rob-p/6159aed154ef6aed690be19eca55e147 to your computer and use it in GitHub Desktop.
antisequence_sciseq3.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use antisequence::*; | |
fn main() { | |
// 1{b[9-10]f[CAGAGC]u[8]b[10]}2{r:} | |
let patterns = r#" | |
name: anchor | |
patterns: | |
- pattern: "CAGAGC" | |
"#; | |
iter_fastq1("example_data/sciseq3_r1.fastq", 256) | |
.unwrap_or_else(|e| panic!("{e}")) | |
.match_any( | |
sel!(), | |
tr!(seq1.* -> seq1.barcode1, seq1.anchor, seq1.rest), | |
patterns, | |
LocalAln { | |
identity: 0.83, | |
overlap: 1.0, | |
}, | |
) | |
.retain(sel!(seq1.anchor)) | |
.cut( | |
sel!(), | |
tr!(seq1.rest -> seq1.umi, seq1.tail1), | |
LeftEnd(8) | |
) | |
.cut( | |
sel!(), | |
tr!(seq1.tail1 -> seq1.barcode2, seq1.junk), | |
LeftEnd(10) | |
) | |
.dbg(sel!()) | |
.run() | |
.unwrap_or_else(|e| panic!("{e}")); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment