trim_reads
Trim sequencing adapters and low-quality ends off FASTQ reads before mapping, and report what was removed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"reads": "<reads>"
},
"name": "trim_reads"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| reads | Yes | the reads to trim, as FASTQ - quality lines are required, because both halves of this need them. | |
| _files | No | The project: record references shaped like _subject. Their records become library documents a tool names in sequences/parts/document; a trace or alignment is found by file name. | |
| adapter | No | the adapter sequence to remove. Unset means quality trimming only. Illumina TruSeq is AGATCGGAAGAGCACACGTCTGAACTCCAGTCAC and Nextera is CTGTCTCTTATACACATCT. | |
| _subject | No | The record to act on: exactly one of sequence, accession (+source), sample (an id from list_samples) or file ({name, text} or {name, base64}); record_index picks one record of several. | |
| min_length | No | reads shorter than this after trimming are COUNTED as too short, not removed - this tool does not filter. 0 reports none. Advanced. | |
| min_overlap | No | an adapter overlap shorter than this is ignored. Low values trim real bases by chance - at 1, a read ending in the adapter's first base is 'trimmed'. Advanced. | |
| adapter_kind | No | which end the adapter sits at. A read running off the end of its insert hits the 3' adapter, which is why that is the default. | three_prime |
| phred_offset | No | quality encoding: 33 for every modern FASTQ, 64 only for pre-1.8 Illumina. Advanced. | |
| max_error_rate | No | errors allowed in the adapter match, as a fraction of the overlap. cutadapt's own default. Advanced. | |
| quality_cutoff_back | No | quality cutoff for the 3' end, where quality decays with cycle number. 0 is off; 20 is the usual choice. NOT a threshold on individual bases - see the description. | |
| quality_cutoff_front | No | quality cutoff for the 5' end, which fails for different reasons than the 3' end and so takes its own number. 0 is off, and off is the usual answer. Advanced. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| report | Yes | what was removed and by which step: bases before and after, the two attributed counts, reads with an adapter, reads emptied and reads left too short | |
| readsEmptied | Yes | reads trimmed to nothing at all - a different alarm from 'too short', because it usually means the read was all adapter | |
| trimmedFastq | Yes | the trimmed reads as FASTQ, ready for `map_reads` | |
| readsWithAdapter | Yes | how many reads carried the adapter - the number that says whether your insert size is shorter than your read length | |
| basesRemovedByAdapter | Yes | bases removed by adapter trimming alone | |
| basesRemovedByQuality | Yes | bases removed by quality trimming alone |