I can extract list of patterns using following command,
fgrep -A 1 -f patternlist.txt filename.fasta
but, is there a way I can extract without creating another file (patternlist.txt in this case) from other command's output?
cut -d " " Cell_cycle.txt -f 1 | grep ...???... filename.fasta
The Cell_cycle.txt looks like this:
$ cat Cell_cycle_Kegg_pathway ctg2977_3.g207.t1 K06626 P05_Ctg654_12.g311.t2 K03094 P06_Ctg710_7.g346.t1 K05868
i want to take the first column and extract those sequences from fasta file.
I have list of sequences in a
>ctg1474_1.g69.t1 (first line) atgaaatgttggtgcagcgccctggcacttctcc...... (second line) >ctg1475_1.g70.t1 (third line) atgaaattgcagcgccctggcacttctcctgcag...... (fourth line)
I want to print the first two sequences (from lines 1 to 4). However, I do not want to use
head -4 UniqueSeq_28Dec2014.fasta which can also give my output, but I want it using process substitution.
I tried the following command but does not seem to work. I just see 4 empty lines.
grep -A 1 -Ff <(grep '>' UniqueSeq_28Dec2014.fasta |head -4) UniqueSeq_28Dec2014.fasta