#!/usr/bin/env bash
Fasta="$1"
Output="$2"
#ID_list="$3" causes script to fail when put in for "list.txt"
bioawk -c fastx 'BEGIN{while((getline k <"list.txt")>0)i[k]=1}{if(i[$name])print ">"$name"\n"$seq}' "$Fasta" | bioawk -c fastx '{ print $name, gc($seq) }' > "$Output"
This script allows me to designate an input fasta file and output a .txt file using command line parameters. It uses a list.txt
file to designate specific fasta ID's. I have tried to make the list.txt
a 3rd parameter (e.g. List=$3
), however this causes the script to fail. Is it possible to make the bioawk command accept a list.txt
file as parameter?