Thanks to visit codestin.com
Credit goes to github.com

Skip to content

samtools faidx - extract a slice of records by index #2278

@prototaxites

Description

@prototaxites

Is your feature request related to a problem? Please specify.

With samtools cat, we can now slice across CRAM files by container, using the syntax:

samtools cat -r "#:start-end" $cram 

It would be nice to have a similar functionality for samtools faidx, in order to facilitate random access to a slice of FASTA/FASTQ records. This would be useful to facilitate e.g. chunked mapping of reads to a reference across multiple jobs, without first splitting a FASTA file into chunks.

Describe the solution you would like.

Perhaps a similar syntax to samtools cat? Extend the region definition so that regions starting with # returns a slice of the fastX file? e.g.

samtools faidx $reads.fq.gz #:0-100000

or

echo #:0-100000 > regions.list

samtools faidx -r regions.list $reads.fq.gz

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions