Skip to content

Piping fx2tab to grep #575

@desmodus1984

Description

@desmodus1984

Hi,
I am interesting in finding genes under selection. 1st, I use Orthofinder to find the orthogroups using protein data.
The issue is that the selection needs codon alignments.
Thus, what I figured out is - first getting the headers with fx2tab from the Orthogroups MSA, and then using grep to retrieve the CDS from a database. I have been trying to minimize file generation.

As of now, I figured I need to save the headers to a file, and then passing this file to grep.

for f in `cat test_SCO.tsv`; do echo -e "\n$f"; seqkit fx2tab -n MSA/${f}.fa > ${f}.IDS | seqkit grep -f ${f}.IDS CDS.db.fasta | seqkit replace -p '_.+'  > ${f}.CDS.ren.fa ; echo -e "Done $f\n" ; done

Can I pipe fx2tab to grep, or do I unavoidable have to create header file?

Thank you

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions