From 82399626064b92fc6aee0f9890e5ca2e3665828c Mon Sep 17 00:00:00 2001 From: Lee Katz - Aspen Date: Mon, 6 Jan 2025 09:39:55 -0500 Subject: [PATCH] fix up documentation a bit --- README.md | 16 ++++++++-------- src/bin/fasten_trim.rs | 15 ++++++++++++++- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 2e5b6ca9..a9002368 100644 --- a/README.md +++ b/README.md @@ -103,13 +103,13 @@ except `fasten_convert`. |[`fasten_validate`](https://lskatz.github.io/fasten/fasten_validate) | Validates your reads (deprecated in favor of `fasten_inspect` and `fasten_repair`| |[`fasten_inspect`](https://lskatz.github.io/fasten/fasten_inspect) | adds information to read IDs such as seqlength | |[`fasten_repair`](https://lskatz.github.io/fasten/fasten_repair) | Repairs corrupted reads | -|[`fasten_quality_filter`](https://lskatz.github.io/fasten/fasten_quality_filter) | Transforms nucleotides to "N" if the quality is low | | -|[`fasten_trim`](https://lskatz.github.io/fasten/fasten_trim) | Blunt-end trims reads | | -|[`fasten_replace`](https://lskatz.github.io/fasten/fasten_replace) | Find and replace using regex | | -|[`fasten_mutate`](https://lskatz.github.io/fasten/fasten_mutate) | introduce random mutations | | -|[`fasten_regex`](https://lskatz.github.io/fasten/fasten_regex) | Filter for reads using regex | | -|[`fasten_progress`](https://lskatz.github.io/fasten/fasten_progress) | Add progress to any place in the pipeline | | -|[`fasten_sort`](https://lskatz.github.io/fasten/fasten_sort) | Sort fastq entries | | +|[`fasten_quality_filter`](https://lskatz.github.io/fasten/fasten_quality_filter) | Transforms nucleotides to "N" if the quality is low | +|[`fasten_trim`](https://lskatz.github.io/fasten/fasten_trim) | Blunt-end trims reads | +|[`fasten_replace`](https://lskatz.github.io/fasten/fasten_replace) | Find and replace using regex | +|[`fasten_mutate`](https://lskatz.github.io/fasten/fasten_mutate) | introduce random mutations | +|[`fasten_regex`](https://lskatz.github.io/fasten/fasten_regex) | Filter for reads using regex | +|[`fasten_progress`](https://lskatz.github.io/fasten/fasten_progress) | Add progress to any place in the pipeline | +|[`fasten_sort`](https://lskatz.github.io/fasten/fasten_sort) | Sort fastq entries | ## Etymology @@ -121,4 +121,4 @@ that indicates that you are securing your analysis by "fasten"ing it (with a sil [![DOI](https://joss.theoj.org/papers/10.21105/joss.06030/status.svg)](https://doi.org/10.21105/joss.06030) -To cite, please refer to Katz et al., (2024). Fasten: a toolkit for streaming operations on fastq files. Journal of Open Source Software, 9(94), 6030, https://doi.org/10.21105/joss.06030 +To cite, please refer to Katz et al., (2024). Fasten: a toolkit for streaming operations on fastq files. Journal of Open Source Software, 9(94), 6030, diff --git a/src/bin/fasten_trim.rs b/src/bin/fasten_trim.rs index 9d17b042..bda566ad 100644 --- a/src/bin/fasten_trim.rs +++ b/src/bin/fasten_trim.rs @@ -17,7 +17,12 @@ //! ### 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 @@ -62,6 +67,14 @@ //! 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.,