pallassgj / bpipe

Automatically exported from code.google.com/p/bpipe
0 stars 1 forks source link

Failing passing a variable using the -p option #105

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I am a beginner with Bpipe.
I am trying to implement a simple mapping stage.

I would like to define the reference genome as a variable set by the user (but 
not as an "input", as defined by Bpipe)

1.Here is my script:
REFERENCE="/media/sf_SequencingData/Genomes/NGS_test_data/Ecoli_K-12_MG1655.fast
a"
map_bwa= {
    exec """
        bwa mem -aM $REFERENCE $input1 $input2 |
        samtools view -buS - |
        samtools sort - $output.bam.prefix
        """
}
Bpipe.run {map_bwa}

2.then I run:
bpipe run ~/scripts/Bpipe/maptorealign.groovy -p 
REFERENCE=/media/sf_SequencingData/Genomes/NGS_test_data/Ecoli_K-12_MG1655.fasta
 /media/sf_SequencingData/Genomes/NGS_test_data/ERR048899_sub_1.fastq 
/media/sf_SequencingData/Genomes/NGS_test_data/ERR048899_sub_2.fastq

3.And I get the following error message:
Pipeline Failed!
A variable referred to in your script on line 11, 'REFERENCE' was not defined.  
Please check that all pipeline stages or other variables you have referenced by 
this name are defined.

What is the expected output? What do you see instead?
output bam file 

What version of the product are you using? On what operating system?
the latest (0.9.8.6)

Please provide any additional information below.
If I set inside the script that 
REFERENCE="/media/sf_SequencingData/Genomes/NGS_test_data/Ecoli_K-12_MG1655.fast
a"
the script is working well. 

Could you please help me to use the -p option correctly?

Original issue reported on code.google.com by fabfab.b...@gmail.com on 28 Oct 2014 at 1:44