blt fastx2tsv(1)

NAME

blt fastx2tsv - Convert FASTA and FASTQ streams to TSV format

SYNOPSIS

blt fastx2tsv < file.fastq > file.tsv
blt fastx2tsv < file.fasta > file.tsv

DESCRIPTION
blt fastx2tsv converts a FASTA or FASTQ stream, possibly containing wrapped sequences and phred scores, into tab-separated data (TSV) for easier processing using standard tools such as awk, cut, etc. The TSV output of processing can be converted back to FASTA or FASTQ format using awk as follows:
awk -F '\t' '{ printf("%s\n%s\n", $1, $2); }' \
    file.tsv > file.fasta
awk -F '\t' '{ printf("%s\n%s\n%s\n%s\n", $1, $2, $3, $4); }' \
    file.tsv > file.fastq

EXAMPLES
# Filter a FASTA file for sequences containing a pattern
blt fastx2tsv < file.fasta | \
    awk -F '\t' '$2 ~ "ATTACGTAAC" { printf("%s\n%s\n", $1, $2); }' \
    > filtered.fasta

SEE ALSO
blt-fastx-derep(1), blt-fastq-derep.sh(1)

AUTHOR
J. Bacon