sr320 / course-fish546-2016

6 stars 5 forks source link

Translating pipes into tabs #61

Closed Ellior2 closed 7 years ago

Ellior2 commented 7 years ago

I'm not able to get this command to work from one of your notebooks

Translate pipes to tab so SPID is in separate column for Joining

!tr '|' "\t" <{dbn}_blast_out.tab> {dbn}_blast_out2.tab

error: ''' is not recognized as an internal or external command, operable program or batch file. Does it matter if it is a tab file or txt? I tried a few other options I found online but none of them seemed to work.

Notebook

sr320 commented 7 years ago

@kubu is it possible this is a Windows issue?

sr320 commented 7 years ago

Sorry meant @kubu4

kubu4 commented 7 years ago

Yes, definitely a Windows issue (can tell by the "batch file" part of the error message).

However, the beginning of the error message is very odd (the ''' is not recognized). Not sure what's happening there.

kubu4 commented 7 years ago

Admittedly, I'm surprised that any of the bash commands are working. When I was testing this, using a fresh install with Anacaonda3 on Windows 10, no bash commands were recognized. I had to have Git Bash installed AND add Git Bash to the Windows 10 system PATH. After that, I could run bash commands (with a caveat - keep reading).

When I run the tr with the exclamation point notation, it fails. However, it fails with an error message that you'd expect ('tr' is not recognized as an internal or external command, operable program or batch file.)

When I run the command using the %%bash cell magics command, the command works fine.

Not sure if any of this helps.

sr320 commented 7 years ago

Correct - That is the instructions they were given via Software Carpentry. https://github.com/sr320/course-fish546-2016/wiki#the-bash-shell

@Ellior2 try using %%bash

So instead of

!tr '|' "\t" <{dbn}_blast_out.tab> {dbn}_blast_out2.tab
%%bash
tr '|' "\t" <{dbn}_blast_out.tab> {dbn}_blast_out2.tab
sr320 commented 7 years ago

Galaxy is a great solution for this .....

screenshot 2016-10-28 at 3 33 26 am

Ellior2 commented 7 years ago

Ahhhh yes! I am starting to see that Galaxy is my friend, helpful tool for our quiz as well. Thanks