I have a list of sequence names:
c32026_g2_i1
c43297_g1_i9
c45863_g2_i2
c43297_g1_i10
c35765_g2_i1
c44444_g3_i1
...
I want to take each sequence from the list and output the annotation of that sequence extracting it from the annotations file
This is what I do and it doesn't work well, for example in the list there is:
c38478_g1_i5
c38478_g1_i4
c38478_g1_i17
c38478_g1_i9
c38478_g1_i18
c38478_g1_i1
and it outputs:
c38478_g1_i5 1018 Q3B724 ...
c38478_g1_i4 1000 Q3B724 ...
c38478_g1_i17 887 Q3B724 ...
c38478_g1_i9 1007 Q3B724 ...
c38478_g1_i18 738 Q3B724 ...
c38478_g1_i1 496 - - - - ...
c38478_g1_i10 950 - - - ...
c38478_g1_i11 249 Q3B724 ...
c38478_g1_i12 706 - - - ...
c38478_g1_i13 654 - - - ...
c38478_g1_i14 809 - - - ...
c38478_g1_i15 217 - - - ...
c38478_g1_i16 788 Q3B724 ...
c38478_g1_i17 887 Q3B724 ...
c38478_g1_i18 738 Q3B724 ...
c38478_g1_i19 548 - - - ...
for f in $(cat list.OE.txt); do grep $f Trinity_uniref_2015_02_filt_ann_out.txt; done > OE.annocript.txt
What are the expected input and output? If you are just greping the list from a file, and your list are store in a file, let's say,
list.txt
, then you can always doYou need "-wFf". When list.txt is huge, "-F" will be much faster.
Yes, that worked :) Thank you