From 6d6fa033c0a5a15ced51215bccb17f5186df82cb Mon Sep 17 00:00:00 2001 From: Lee Katz - Aspen Date: Mon, 6 Jan 2025 09:57:09 -0500 Subject: [PATCH] updated docs --- docs/fasten_trim/fn.main.html | 2 +- docs/fasten_trim/fn.read_fasta.html | 2 +- docs/fasten_trim/fn.trim_worker.html | 2 +- docs/fasten_trim/index.html | 21 ++++++++++----- docs/src/fasten_trim/fasten_trim.rs.html | 34 +++++++++++++++++++++--- src/bin/fasten_trim.rs | 6 ++--- 6 files changed, 51 insertions(+), 16 deletions(-) diff --git a/docs/fasten_trim/fn.main.html b/docs/fasten_trim/fn.main.html index 8afb44e6..6114f8cc 100644 --- a/docs/fasten_trim/fn.main.html +++ b/docs/fasten_trim/fn.main.html @@ -1,2 +1,2 @@ main in fasten_trim - Rust -

Function fasten_trim::main

source ·
pub(crate) fn main()
\ No newline at end of file +

Function fasten_trim::main

source ·
pub(crate) fn main()
\ No newline at end of file diff --git a/docs/fasten_trim/fn.read_fasta.html b/docs/fasten_trim/fn.read_fasta.html index 607ffdf2..a33c3260 100644 --- a/docs/fasten_trim/fn.read_fasta.html +++ b/docs/fasten_trim/fn.read_fasta.html @@ -1,3 +1,3 @@ read_fasta in fasten_trim - Rust -

Function fasten_trim::read_fasta

source ·
pub(crate) fn read_fasta(file_path: &str) -> HashMap<String, String>
Expand description

Read a fasta file and return a HashMap of the sequences

+

Function fasten_trim::read_fasta

source ·
pub(crate) fn read_fasta(file_path: &str) -> HashMap<String, String>
Expand description

Read a fasta file and return a HashMap of the sequences

\ No newline at end of file diff --git a/docs/fasten_trim/fn.trim_worker.html b/docs/fasten_trim/fn.trim_worker.html index 44e3489b..77db084e 100644 --- a/docs/fasten_trim/fn.trim_worker.html +++ b/docs/fasten_trim/fn.trim_worker.html @@ -1,5 +1,5 @@ trim_worker in fasten_trim - Rust -

Function fasten_trim::trim_worker

source ·
pub(crate) fn trim_worker(
+    

Function fasten_trim::trim_worker

source ·
pub(crate) fn trim_worker(
     seq: Seq,
     suggested_first_base: usize,
     suggested_last_base: usize,
diff --git a/docs/fasten_trim/index.html b/docs/fasten_trim/index.html
index 985ecc18..eb544f64 100644
--- a/docs/fasten_trim/index.html
+++ b/docs/fasten_trim/index.html
@@ -1,12 +1,17 @@
 fasten_trim - Rust
-    

Crate fasten_trim

source ·
Expand description

Trims reads using 0-based coordinates

+

Crate fasten_trim

source ·
Expand description

Trims reads using 0-based coordinates

§Examples

§Adapters

§Download the adapter files

mkdir -pv $HOME/db
 pushd $HOME/db # step into the db directory
 git clone https://github.com/lskatz/adapterseqs
 ADAPTERS=$(find $HOME/db/adapterseqs -name '*.fa')
 popd # return to the original directory
-

§Trim the adapters

cat file.fastq | fasten_trim 
+

§Trim the adapters

cat file.fastq | \
+  fasten_trim --adapterseqs <(echo -e ">test\nCTTT") > trimmed.fastq
+ 
+cat $HOME/db/adapterseqs/adapters/*.fa > ./adapters.fasta
+cat file.fastq | \
+  fasten_trim --adapterseqs ./adapters.fasta > trimmed.fastq
 

§Blunt-end trim five bases from the right side

cat file.fastq | fasten_trim -l -5 > trimmed.fastq
 

§Keep a maximum of 100bp with blunt-end trimming on the right side

cat file.fastq | fasten_trim -l 99 > trimmed.fastq
 

§Blunt-end trim 5bp from the left side

cat file.fastq | fasten_trim -f 4  > trimmed.fastq
@@ -28,9 +33,13 @@ 

§Examples

Compare the blunt end suggested trimming against where an adapter might be found and move the marker as the most inward possible
  • Trim the sequence and quality strings
  • -

    §Output

    -

    The deflines will be altered with a description of the trimming using key=value syntax, separated by spaces, e.g., -@M03235:53:000000000-AHLTD:1:1101:1826:14428 trimmed_adapter_rev=TT trimmed_left=0 trimmed_right=249 -or for a forward adapter, +

    Making the output more explicit while combining both algorithms can involve a two step process:

    +
    cat file.fastq | \
    +  fasten_trim --adapterseqs ./adapters.fasta | \
    +  fasten_trim -f 4 -l 99 > trimmed.fastq
    +

    §Output

    +

    The deflines will be altered with a description of the trimming using key=value syntax, separated by spaces, e.g.,
    +@M03235:53:000000000-AHLTD:1:1101:1826:14428 trimmed_adapter_rev=TT trimmed_left=0 trimmed_right=249
    +or for a forward adapter,
    @M03235:53:000000000-AHLTD:1:1101:1758:14922 trimmed_adapter_fwd=AA trimmed_left=2 trimmed_right=251

    Functions§

    • main 🔒
    • read_fasta 🔒
      Read a fasta file and return a HashMap of the sequences
    • Trim a set of fastq entries and send it to a channel
    \ No newline at end of file diff --git a/docs/src/fasten_trim/fasten_trim.rs.html b/docs/src/fasten_trim/fasten_trim.rs.html index 4c0f089f..7642a880 100644 --- a/docs/src/fasten_trim/fasten_trim.rs.html +++ b/docs/src/fasten_trim/fasten_trim.rs.html @@ -281,6 +281,19 @@

    Files

    279 280 281 +282 +283 +284 +285 +286 +287 +288 +289 +290 +291 +292 +293 +294
    //! Trims reads using 0-based coordinates
     //! 
     //! # Examples
    @@ -300,7 +313,12 @@ 

    Files

    //! ### Trim the adapters //! //! ```bash -//! cat file.fastq | fasten_trim +//! cat file.fastq | \ +//! fasten_trim --adapterseqs <(echo -e ">test\nCTTT") > trimmed.fastq +//! +//! cat $HOME/db/adapterseqs/adapters/*.fa > ./adapters.fasta +//! cat file.fastq | \ +//! fasten_trim --adapterseqs ./adapters.fasta > trimmed.fastq //! ``` //! //! ## Blunt-end trim five bases from the right side @@ -345,11 +363,19 @@

    Files

    //! 3. Compare the blunt end suggested trimming against where an adapter might be found and move the marker as the most inward possible //! 4. Trim the sequence and quality strings //! +//! Making the output more explicit while combining both algorithms can involve a two step process: +//! +//! ```bash +//! cat file.fastq | \ +//! fasten_trim --adapterseqs ./adapters.fasta | \ +//! fasten_trim -f 4 -l 99 > trimmed.fastq +//! ``` +//! //! # Output //! -//! The deflines will be altered with a description of the trimming using key=value syntax, separated by spaces, e.g., -//! `@M03235:53:000000000-AHLTD:1:1101:1826:14428 trimmed_adapter_rev=TT trimmed_left=0 trimmed_right=249` -//! or for a forward adapter, +//! The deflines will be altered with a description of the trimming using key=value syntax, separated by spaces, e.g., +//! `@M03235:53:000000000-AHLTD:1:1101:1826:14428 trimmed_adapter_rev=TT trimmed_left=0 trimmed_right=249` +//! or for a forward adapter, //! `@M03235:53:000000000-AHLTD:1:1101:1758:14922 trimmed_adapter_fwd=AA trimmed_left=2 trimmed_right=251` extern crate fasten; diff --git a/src/bin/fasten_trim.rs b/src/bin/fasten_trim.rs index bda566ad..07ce9393 100644 --- a/src/bin/fasten_trim.rs +++ b/src/bin/fasten_trim.rs @@ -77,9 +77,9 @@ //! //! # Output //! -//! The deflines will be altered with a description of the trimming using key=value syntax, separated by spaces, e.g., -//! `@M03235:53:000000000-AHLTD:1:1101:1826:14428 trimmed_adapter_rev=TT trimmed_left=0 trimmed_right=249` -//! or for a forward adapter, +//! The deflines will be altered with a description of the trimming using key=value syntax, separated by spaces, e.g., +//! `@M03235:53:000000000-AHLTD:1:1101:1826:14428 trimmed_adapter_rev=TT trimmed_left=0 trimmed_right=249` +//! or for a forward adapter, //! `@M03235:53:000000000-AHLTD:1:1101:1758:14922 trimmed_adapter_fwd=AA trimmed_left=2 trimmed_right=251` extern crate fasten;