-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat!: move fastq functionality to reads subcommand
- Loading branch information
Showing
4 changed files
with
348 additions
and
265 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use std::io::stdout; | ||
use std::path::PathBuf; | ||
use clap::Parser; | ||
use log::{debug, error, info, warn}; | ||
use niffler::compression; | ||
use crate::cli::{Coverage, GenomeSize, check_path_exists, parse_fraction, parse_compression_format, parse_level, CliError}; | ||
use crate::{Cli, Fastx, Runner, SubSampler}; | ||
use anyhow::{anyhow, Context, Result}; | ||
|
||
#[derive(Debug, Parser)] | ||
#[command(author, version, about)] | ||
pub struct Alignment { | ||
/// Path to the indexed alignment file (SAM/BAM/CRAM) to subsample | ||
#[clap(value_parser = check_path_exists, name = "FILE")] | ||
pub aln: PathBuf, | ||
|
||
/// The desired depth of coverage to subsample the reads to | ||
#[clap( | ||
short, | ||
long, | ||
value_name = "FLOAT", | ||
)] | ||
pub coverage: Option<Coverage>, | ||
} | ||
|
||
impl Runner for Alignment { | ||
fn run(&mut self) -> Result<()> { | ||
info!("Subsampling alignment file: {:?}", self.aln); | ||
Ok(()) | ||
} | ||
} |
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
Oops, something went wrong.