Bareword found where operator expected at ... error, step 1

395 views
Skip to first unread message

juliannichol...@gmail.com

unread,
Apr 11, 2016, 8:39:51 PM4/11/16
to GBS-SNP-CROP: GBS SNP Calling Reference Optional Pipeline
Hello, I am trying to run the tutorial to get a feel for the pipeline before I use my data and compile huge files. I am on step one and running this command:

perl ./GBS-SNP-CROP-1.pl -d PE -b barcodesID.txt -fq L001 -s 1 -e 2 -enz1 TGCA -enz2 CGG

with ./ referencing the folder containing the associated pl files and the .gz, and .txt files. 

This is what cygwin returns:

$ perl ./GBS-SNP-CROP-1.pl -d PE -b barcodesID.txt -fq L001 -s 1 -e 2 -enz1 TGCA -enz2 CGG
Bareword found where operator expected at ./GBS-SNP-CROP-1.pl line 6, near ""en" class"
        (Missing operator before class?)
Bareword found where operator expected at ./GBS-SNP-CROP-1.pl line 26, near "<title>GBS"
        (Missing operator before GBS?)
Bareword found where operator expected at ./GBS-SNP-CROP-1.pl line 26, near "1.pl"
        (Missing operator before pl?)
Can't modify numeric lt (<) in scalar assignment at ./GBS-SNP-CROP-1.pl line 6, near ""en" class"
syntax error at ./GBS-SNP-CROP-1.pl line 6, near ""en" class"
Unrecognized character \xC2; marked by <-- HERE after at master <-- HERE near column 53 at ./GBS-SNP-CROP-1.pl line 26.

I thought this was an error with the pl  file so I downloaded it again and still I get the same error. 

Thanks in advance for your help. 

Arthur Melo

unread,
Apr 12, 2016, 9:25:31 AM4/12/16
to GBS-SNP-CROP: GBS SNP Calling Reference Optional Pipeline
Hi Julian, thank you for your interest in GBS-SNP-CROP pipeline...

I downloaded the tutorial and scripts right now and rerun the pipeline and it doesn't print any error. 
The error you reported is so weird to me, once A 'Bareword' error is caused by a syntax error in the code. A 'runaway multi-line' usually pinpoints where the start of the error is, and usually means that a line has not been completed, often because of mismatched brackets or quote marks. 

For example, the line 6 from script 1 is a empty line and the mensage "Bareword found where operator expected at ./GBS-SNP-CROP-1.pl line 6, near ""en" class" (Missing operator before class?)" doesn't make any sense because there are "en" "class" in the end of line. Why on line 6 from your script 1 has words like "en" and "class"?? The same situation for line 26, for example. Why "<title>GBS" appeared in the end of line 26?

So, please check the code you are using and mainly if the file is a unix-based file. Be carefull with different OSs and makes sure your code was not corrupted before you start to use.

Please, let me know if you are able figure out whats going on.

Best,
Arthur

juliannichol...@gmail.com

unread,
Apr 12, 2016, 10:23:52 AM4/12/16
to GBS-SNP-CROP: GBS SNP Calling Reference Optional Pipeline
I just downloaded everything again, and typed in the code to ensure there were no hidden characters I could have missed using jedit, and still I got this back from cygwin:

$ perl ./GBS-SNP-CROP-1.pl -d PE -b barcodesID.txt -fq L001 -s 1 -e 2 -enz1 TGCA -enz2 CGG
Bareword found where operator expected at ./GBS-SNP-CROP-1.pl line 6, near ""en" class"
        (Missing operator before class?)
Bareword found where operator expected at ./GBS-SNP-CROP-1.pl line 26, near "<title>GBS"
        (Missing operator before GBS?)
Bareword found where operator expected at ./GBS-SNP-CROP-1.pl line 26, near "1.pl"
        (Missing operator before pl?)
Can't modify numeric lt (<) in scalar assignment at ./GBS-SNP-CROP-1.pl line 6, near ""en" class"
syntax error at ./GBS-SNP-CROP-1.pl line 6, near ""en" class"
Unrecognized character \xC2; marked by <-- HERE after at master <-- HERE near column 53 at ./GBS-SNP-CROP-1.pl line 26.

I am using v1.1 because I want to use PE data, and cygwin64 terminal on a windows machine. 

Arthur Melo

unread,
Apr 12, 2016, 12:51:11 PM4/12/16
to GBS-SNP-CROP: GBS SNP Calling Reference Optional Pipeline
Hi Julian,
If you are using a Windows machine you need to convert the scripts for Windows, once all uploaded on GitHub are Unix-based scripts. I use TextWrangler for this kind of conversion. See attached.

I converted the GBS-SNP-CROP-1.pl for you. Try to use the attached code and let me know if some error was showed.

Best,
Arthur
Screen Shot 2016-04-12 at 12.45.57 PM.png
GBS-SNP-CROP-1_w.pl

juliannichol...@gmail.com

unread,
Apr 15, 2016, 5:40:15 AM4/15/16
to GBS-SNP-CROP: GBS SNP Calling Reference Optional Pipeline
Thanks for the help, I will keep this in mind when I decide to try this again on my PC, but for now I am going to use a ubuntu machine to at least get results. I will keep you posted as I progress through the pipeline in the terminal. 

juliannichol...@gmail.com

unread,
Apr 15, 2016, 1:45:15 PM4/15/16
to GBS-SNP-CROP: GBS SNP Calling Reference Optional Pipeline
I am moving down the tutorial pipeline well, though I cannot get the script to locate barcodesID.txt. The file downloads from your tutorial site as a .txt but the appendix clearly stated that a tab delimited file is required. Also the pipeline indicates that it cannot find the file. I currently have the barcode file in the same location as the working directory. 

Arthur Melo

unread,
Apr 19, 2016, 9:35:11 PM4/19/16
to GBS-SNP-CROP: GBS SNP Calling Reference Optional Pipeline
Hello Julian,
The pipeline require a tab-delimited file and it certainly may be a .txt file.

Please, check your files and directories. If the error keep, please send me your command line and the error message.

Best,
Arthur

jays...@gmail.com

unread,
May 26, 2016, 12:52:22 AM5/26/16
to GBS-SNP-CROP: GBS SNP Calling Reference Optional Pipeline
For anyone else running into this issue, it occurs when you try to save the perl scripts from github using your browser.
Some of the links will save as a .pl file, however it actually saves a github webpage and the XML etc is what's causing the perl errors.

You either need to download the .zip file with the scripts in it, or copy the code and save it manually. 
Reply all
Reply to author
Forward
0 new messages