sr320 / course-fish546-2016

6 stars 5 forks source link

extrating information nested in a column #100

Closed yaaminiv closed 7 years ago

yaaminiv commented 7 years ago

I want to extract Uniprot Accession codes from the following file:

blastx matches; codes in second column

I was planning on using the Galaxy, but the file modifications are taking more than a day. Any suggestions on a faster way to do this?

sr320 commented 7 years ago

Practically, what do you literally need to do to the file?

yaaminiv commented 7 years ago

I want to remove the extraneous information from the second column and have only the accession codes (i.e. sp|P07104|FANA_ECOLX --> P07104). I was using the "Trim" tool in Galaxy, but it has yet to complete the job.

yaaminiv commented 7 years ago

I ended up using the code tr '|' '\t' < file to convert all pipes to tabs in my file, giving me a separate column with accession codes.