extract Go numbers
1
0
Entering edit mode
7.9 years ago
Alex ▴ 50

Hi,everyone I have meet some easy problems while I am confused about it at present ,I want to extract the locus names and Go numbers use the awk input file 1

pacId locusName transcriptName Pfam Panther GO

32694439 Seita.1G000300 Seita.1G000300.1 PF12906 PTHR23012,PTHR23012:SF99 GO:GO:0008270 


32697763 Seita.1G001600 Seita.1G001600.1 PF00225 PTHR24115,PTHR24115:SF480 GO:GO:0008017

The goal file2

locusName GO 

Seita.1G000300 GO:0008270 

Seita.1G001600 GO:0008017

while I use the cat file1| awk '{print $2"\t"$6}'>file2 ,it appears some errors

locusName GO 

Seita.1G000300 PTHR23012:SF99 

Seita.1G001600 PTHR24115:SF480

I know the excel software can solve it well,but I want to know use the awk to settle it.

Thanks

Alex

RNA-Seq • 1.2k views
ADD COMMENT
0
Entering edit mode

I have meet some easy problems

Then you can solve it. Try saying awk which kind file you are providing (tab separated, comma separated..etc) with -F argument and let us know the output.

ADD REPLY
0
Entering edit mode

while it did not work well

ADD REPLY
3
Entering edit mode
7.9 years ago

the default delimiter of awk is NOT the tabulation but any number of whitespace.

If the delimiter is a tabulation, then just try cut -f 2,6.

ADD COMMENT
0
Entering edit mode

Thank you ,It works well

ADD REPLY
0
Entering edit mode

so nyou can flag this answer as "accepted" (on the left)

ADD REPLY

Login before adding your answer.

Traffic: 2682 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6