-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add fas2one and fqs2one commands for batch file conversion
- Loading branch information
Showing
10 changed files
with
85 additions
and
48 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
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
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,29 @@ | ||
use anyhow::Result; | ||
use clap::Parser; | ||
use deepbiop_fa as fa; | ||
|
||
use std::path::PathBuf; | ||
|
||
use super::set_up_threads; | ||
|
||
#[derive(Debug, Parser)] | ||
pub struct FasToOne { | ||
/// path to the fa file | ||
#[arg(value_name = "fas", action=clap::ArgAction::Append)] | ||
fas: Vec<PathBuf>, | ||
|
||
/// output bgzip compressed file | ||
#[arg(long, value_name = "output")] | ||
output: PathBuf, | ||
|
||
#[arg(short, long, default_value = "2")] | ||
threads: Option<usize>, | ||
} | ||
|
||
impl FasToOne { | ||
pub fn run(&self) -> Result<()> { | ||
set_up_threads(self.threads)?; | ||
fa::io::convert_multiple_fas_to_one_bgzip_fa(&self.fas, &self.output, true)?; | ||
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
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,29 @@ | ||
use anyhow::Result; | ||
use clap::Parser; | ||
use deepbiop_fq as fq; | ||
|
||
use std::path::PathBuf; | ||
|
||
use super::set_up_threads; | ||
|
||
#[derive(Debug, Parser)] | ||
pub struct FqsToOne { | ||
/// path to the fq file | ||
#[arg(value_name = "fqs", action=clap::ArgAction::Append)] | ||
fqs: Vec<PathBuf>, | ||
|
||
/// output bgzip compressed file | ||
#[arg(long, value_name = "output")] | ||
output: PathBuf, | ||
|
||
#[arg(short, long, default_value = "2")] | ||
threads: Option<usize>, | ||
} | ||
|
||
impl FqsToOne { | ||
pub fn run(&self) -> Result<()> { | ||
set_up_threads(self.threads)?; | ||
fq::io::convert_multiple_fqs_to_one_bgzip_fq(&self.fqs, &self.output, true)?; | ||
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
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
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
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
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