z0on / GO_MWU

Rank-based Gene Ontology analysis of gene expression data
37 stars 17 forks source link

Error running R code #2

Closed cjvegame closed 1 year ago

cjvegame commented 6 years ago

Hello,

I downloaded your test data to see whether I had downloaded all the required R packages. However. I got the following error code. I did as it was instructed placed all of the files in the same directory as well as named them accordingly. Have you ever encountered this problem before?

/bin/sh: -c: line 0: syntax error near unexpected token (' /bin/sh: -c: line 0:perl ./gomwu_a.pl go.obo c(2609, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 22, 23, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, ' Error in file(file, "rt") : invalid 'description' argument In addition: Warning message: In if (!file.exists(outname)) { : the condition has length > 1 and only the first element will be used

z0on commented 6 years ago

Hmm. This does look strange. Are you Windows? If yes, do you have perl? If not, install it and specify the path to it as perlPath argument in the call to gomwuStats. If you are a Mac or Linux with build-in perl, let me know, I'll try to think of something else...

cjvegame commented 6 years ago

Hey Zoon, No I am a mac user. So I had to switch things around namely I had to modify slightly the first lines of your code. Namely, I just had to make sure R was reading those files. I did that by adding. "read.csv" "read.table" and "get_OBO" I was able to reduce the problem to the following error.

Error in file(file, "rt") : invalid 'description' argument In addition: Warning message: In if (!file.exists(outname)) { : the condition has length > 1 and only the first element will be used

z0on commented 6 years ago

I will need to see your modified code then (the way R reports errors is traditionally nearly entirely useless)

z0on commented 6 years ago

(the only thing to change in the code to make it windows-friendly should be that perlPath setting...)

cjvegame commented 6 years ago

Sure no problem. Let me see if I can send you my code. as well as the file types?

cjvegame commented 6 years ago

I am unable to send it to you via here. Would it be possible to send you all the filed I have via the posted email in the github?

cjvegame commented 6 years ago

I couldn't upload the go.obo file but I got that from the gene ontology.

On Tue, May 29, 2018 at 5:03 PM, Mikhail V Matz notifications@github.com wrote:

(the only thing to change in the code to make it windows-friendly should be that perlPath setting...)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/z0on/GO_MWU/issues/2#issuecomment-392944163, or mute the thread https://github.com/notifications/unsubscribe-auth/AKUAz7eeHLfF5ANrdz7yEhfgljM2tt2Rks5t3be-gaJpZM4USErv .

z0on commented 6 years ago

yes! matz@utexas.edu Just send the file that you have edited (GO_MWU.R, I assume)

On May 29, 2018, at 4:18 PM, cjvegame notifications@github.com wrote:

I am unable to send it to you via here. Would it be possible to send you all the filed I have via the posted email in the github?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/z0on/GO_MWU/issues/2#issuecomment-392948483, or mute the thread https://github.com/notifications/unsubscribe-auth/AHNDmHiWaKcTosmLqBJYditDlWYYVc8Gks5t3bsMgaJpZM4USErv.

cjvegame commented 6 years ago

Yeah no problem. I really appreciate it.

cjvegame commented 6 years ago

Hello Z00n, so you were right everything was working. My problem was that I was trying to save a tab delimited file with mac or windows default which is notepad and pages. I think there was something off that the program was not recognizing the file type.

I am going to put this issue as solved but I was curious what text editor do you use?

z0on commented 6 years ago

Ah, those line endings. TextWrangler : https://itunes.apple.com/us/app/textwrangler/id404010395?mt=12 https://itunes.apple.com/us/app/textwrangler/id404010395?mt=12

On Jun 4, 2018, at 8:04 PM, cjvegame notifications@github.com wrote:

Hello Z00n, so you were right everything was working. My problem was that I was trying to save a tab delimited file with mac or windows default which is notepad and pages. I think there was something off that the program was not recognizing the file type.

I am going to put this issue as solved but I was curious what text editor do you use?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/z0on/GO_MWU/issues/2#issuecomment-394538015, or mute the thread https://github.com/notifications/unsubscribe-auth/AHNDmM0AG-PBw05hPicjMAB8N9neKeg9ks5t5cr9gaJpZM4USErv.