Entering edit mode
6.3 years ago
1234anjalianjali1234
▴
50
Hellow,
I want to extract the lines containing ID from my GFF file using ID fom other file.
My GFF file:
st00 PGSC0003DMC400069336 5046482 5046991
st00 PGSC0003DMC400069337 35003649 35012075
st00 PGSC0003DMC400069343 7843951 7845166
st00 PGSC0003DMC400069373 9133414 9134204
st00 PGSC0003DMC400069455 5268379 5270012
st1 PGSC0003DMC400000001 71267700 71268573
st1 PGSC0003DMC400000002 71267700 71269327
st1 PGSC0003DMC400000003 71268310 71268573
st1 PGSC0003DMC400000004 71271492 71272645
File containing IDs:
PGSC0003DMC400001685
PGSC0003DMC400001686
PGSC0003DMC400004210
PGSC0003DMC400004304
PGSC0003DMC400004305
PGSC0003DMC400004307
PGSC0003DMC400004308
PGSC0003DMC400004309
PGSC0003DMC400004310
PGSC0003DMC400005061
PGSC0003DMC400005062
PGSC0003DMC400005063
I have tried using various command:
ruby -pe 'File.open("blastid.txt").each { |i| puts i if i =~ /\$_/ }' uniqueCDS.txt > finaltry.txt
awk -F '\t' 'NR==FNR {id[$1]; next} $1 in id' blastid.txt uniqueCDS.txt
xargs -I {} grep "^{}" uniqueCDS.txt < blastid.txt
But nothing is working.
I need help
Thank you
you want linux join. https://linux.die.net/man/1/join
This code is not working.
Unless you show us the code how can we tell you why it is not working.
https://meta.stackexchange.com/questions/147616/ What Do You Mean “It Doesn't Work”?
Sorry, I have tried join by using this command:
but my output is: