Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

perl conflict #44

Open
EricDeveaud opened this issue Feb 19, 2016 · 8 comments
Open

perl conflict #44

EricDeveaud opened this issue Feb 19, 2016 · 8 comments

Comments

@EricDeveaud
Copy link

setting provread to use a specific perl not in usr path, it will fail

eg
in user path /usr/bin/perl is 5.8
and we install proovread to use #!/some/where/perl perl > 5.10

proovread will handle an incorrect perl version in his calls due to the way RealPerl is determined

my $RealPerl = "perl -I${RealLib} $RealBin";
should be
my $RealPerl = ""$^X -I${RealLib} $RealBin";

in order to get the perl it is run with

regards

Eric

@EricDeveaud
Copy link
Author

in addition

proovread fail on line 1627

if ($_ =~ /^perl /){

should be accordingly

if ($_ =~ /^$RealPerl /){

@EricDeveaud
Copy link
Author

used /local/gensoft2/adm/perl-5.22/bin/per to run proovread
and it uses perl available on the user path which is not the correct one.

perl --version 

This is perl, v5.8.9 built for x86_64-linux

this cause perl warnings and false error on the bam2cns status.

see logs

/tmp > git clone --recursive https://github.com/BioInf-Wuerzburg/proovread proovread-2.12
/tmp > cd proovread-2.12
/tmp/proovread-2.12 > cd util/bwa && make
uti/bwa/ > cd -
/tmp/proovread-2.12 >  /local/gensoft2/adm/perl-5.22/bin/perl ./bin/proovread --sample --pre pr-sample
[Mon Feb 22 11:15:56 2016] Running proovread-2.13.11
[Mon Feb 22 11:15:56 2016] Reading core config
[Mon Feb 22 11:15:56 2016] Reading command line options
[Mon Feb 22 11:15:56 2016] Logging parameter to pr-sample/pr-sample.parameter.log
[Mon Feb 22 11:15:56 2016] Checking short read files

F.antasticus_short.fq
  Detected FASTQ format
  Estimated short read length: 100 +-0
  Estimating approximate number of short reads: 50.0k

[Mon Feb 22 11:15:56 2016] Checking required binaries

  [ok] samtools-1.2    /local/gensoft2/exe/samtools/1.2/scripts
  [ok] bwa-proovread   /tmp/proovread-2.12/bin/../util/bwa
  [ok] blastn-2.2.28   /local/gensoft2/exe/blast+/2.2.28/scripts

[Mon Feb 22 11:15:57 2016] Running mode: sr
[Mon Feb 22 11:15:57 2016] Preparing long reads
#------------------------------------------------------------------------------#
perl -I/tmp/proovread-2.12/bin/../lib/ /tmp/proovread-2.12/bin/SeqFilter --fast\
a --in pr-sample/read-long/pr-sample.fq --line-width 80 --lower-case --out pr-s\
ample/read-long/pr-sample.masked.fa --phred-offset 33
Argument "0.13.3" isn't numeric in subroutine entry at /tmp/proovread-2.12/bin/../lib//Fastq/Parser.pm line 13.
Argument "0.13.3" isn't numeric in subroutine entry at /tmp/proovread-2.12/bin/SeqFilter line 17.
Argument "0.9.0" isn't numeric in subroutine entry at /tmp/proovread-2.12/bin/../lib//Fasta/Parser.pm line 12.
Argument "1.0.0" isn't numeric in subroutine entry at /tmp/proovread-2.12/bin/SeqFilter line 19.
Argument "0.9.0" isn't numeric in subroutine entry at /tmp/proovread-2.12/bin/SeqFilter line 20.
[11:15:57] /tmp/proovread-2.12/bin/SeqFilter-1.06
[11:15:57] --in: pr-sample/read-long/pr-sample.fq
[11:15:57] Detected FASTQ format, phred-offset 33
    0  [                                                          ]^M 6.43k [=>                                                        ]^M  257k [=========================================================>] TTS 00:00:00
#------------------------------------------------------------------------------#
[11:15:57] Input
[11:15:57] Sequences              121 #
[11:15:57] Total               126422 bp
[11:15:57] Longest               1074 bp
[11:15:57] Shortest              1012 bp
[11:15:57] N50                   1045 bp
[11:15:57] N90                   1032 bp
#------------------------------------------------------------------------------#
[11:15:57] Filtered
[11:15:57] Sequences              121 #
[11:15:57] Total               126422 bp
[11:15:57] Longest               1074 bp
[11:15:57] Shortest              1012 bp
[11:15:57] N50                   1045 bp
[11:15:57] N90                   1032 bp
#------------------------------------------------------------------------------#

#------------------------------------------------------------------------------#
[Mon Feb 22 11:15:57 2016] Read IDs don't look like proper PacBio subread IDs.
Falling back to running mode: sr-noccs

[Mon Feb 22 11:15:57 2016] Running task bwa-sr-1
[Mon Feb 22 11:15:57 2016] Indexing Long reads
#------------------------------------------------------------------------------#
/tmp/proovread-2.12/bin/../util/bwa/bwa-proovread index pr-sample/read-long/pr-\
sample.masked.fa pr-sample/read-long/pr-sample.masked.fa 2>pr-sample/bwa-sr-1/p\
r-sample_bwa.log
#------------------------------------------------------------------------------#
[Mon Feb 22 11:15:57 2016] Mapping reads `/tmp/proovread-2.12/bin/../sample/F.an
tasticus_short.fq`
#------------------------------------------------------------------------------#
/tmp/proovread-2.12/bin/SeqChunker --chunk-number 1000 --chunk-step 20 --chunks\
-per-step 6 --first-chunk 1 /tmp/proovread-2.12/bin/../sample/F.antasticus_shor\
t.fq | /tmp/proovread-2.12/bin/../util/bwa/bwa-proovread mem -b 20 -l 300 -Y  -\
t 4 -r 1 -L 30,30 -A 5 -a  -y 20 -D 0 -T 2.5 -E 4,3 -W 20 -B 11 -w 40 -k 12 -O \
2,1 pr-sample/read-long/pr-sample.masked.fa /dev/fd/0 2>pr-sample/bwa-sr-1/pr-s\
ample_bwa.log | samtools view -@ 4 -bS /dev/fd/0 >pr-sample/bwa-sr-1/pr-sample_\
tmp.bam
#------------------------------------------------------------------------------#
Reading /tmp/proovread-2.12/bin/../sample/F.antasticus_short.fq

[Mon Feb 22 11:15:58 2016] Sorting BAM `pr-sample/bwa-sr-1/pr-sample.bam`
#------------------------------------------------------------------------------#
samtools sort -m 2G -@ 3 -T pr-sample/bwa-sr-1/pr-sample_tmp -o pr-sample/bwa-s\
r-1/pr-sample.bam pr-sample/bwa-sr-1/pr-sample_tmp.bam
#------------------------------------------------------------------------------#

[Mon Feb 22 11:15:59 2016] Indexing BAM `pr-sample/bwa-sr-1/pr-sample`
#------------------------------------------------------------------------------#
samtools index pr-sample/bwa-sr-1/pr-sample.bam
#------------------------------------------------------------------------------#

[Mon Feb 22 11:15:59 2016] Correcting Sequences (2 batches)
#------------------------------------------------------------------------------#
[Mon Feb 22 11:15:59 2016] Batch 1/2
perl -I/tmp/proovread-2.12/bin/../lib/ /tmp/proovread-2.12/bin/bam2cns --append\
 1 --bam pr-sample/bwa-sr-1/pr-sample.bam --bin-size 20 --coverage 11.25 --igno\
re-weak-reads 0 --mask-weak-reads 0 --max-ins-length 0 --max-ref-seqs 100 --pre\
fix pr-sample/bwa-sr-1/pr-sample.0 --qv-offset 33 --ref pr-sample/read-long/pr-\
sample.fq --ref-offset 0 
#------------------------------------------------------------------------------#
[Mon Feb 22 11:15:59 2016] Batch 2/2
perl -I/tmp/proovread-2.12/bin/../lib/ /tmp/proovread-2.12/bin/bam2cns --append\
 1 --bam pr-sample/bwa-sr-1/pr-sample.bam --bin-size 20 --coverage 11.25 --igno\
re-weak-reads 0 --mask-weak-reads 0 --max-ins-length 0 --max-ref-seqs 100 --pre\
fix pr-sample/bwa-sr-1/pr-sample.1 --qv-offset 33 --ref pr-sample/read-long/pr-\
sample.fq --ref-offset 212420 
#------------------------------------------------------------------------------#
Bareword found where operator expected at /tmp/proovread-2.12/bin/../lib//Sam/A\
lignment.pm line 117, near "Get/Set"
#------------------------------------------------------------------------------#
[Mon Feb 22 11:15:59 2016] bam2cns unexpectedly returned
        Exited at 'main'
        './bin/proovread', line 1635
        Last call 'main::correct_sr_mt'
        './bin/proovread', line 869

@thackl
Copy link
Contributor

thackl commented Feb 22, 2016

Hi Eric,

my suggestion would be to
export PATH=/local/gensoft2/adm/perl-5.22/bin/:$PATH
before running proovread, rather than trying to invoke perl with absolute path. That should clear up all the issues.

Cheers
Thomas

@EricDeveaud
Copy link
Author

nop !!!!!

central installation policy over here is to use a specific perl. user have another perl in path.

solution is to be consistent in perl usage.
whatever perl the user is calling you must comform to his choice.

so use the one that was used for the inner perl calls.
solution is given here:

--- proovread.ori       2016-02-22 12:04:07.320090427 +0100
+++ proovread   2016-02-22 12:07:02.449371094 +0100
@@ -1,4 +1,4 @@
-#!/usr/bin/env perl
+#! /local/gensoft2/adm/perl-5.22/bin/perl

 use warnings;
 use strict;
@@ -45,7 +45,7 @@
 our $VERSION = '2.13.11';

 my $RealLib = "$RealBin/../lib/";
-my $RealPerl = "perl -I${RealLib} $RealBin";
+my $RealPerl = "$^X -I${RealLib} $RealBin";

 =head1 NAME

@@ -1624,7 +1624,7 @@
        my $bs = "Batch %d/".@$lr_chunk_offsets;
        while(<$xgr>){
                chomp();
-               if ($_ =~ /^perl /){
+               if ($_ =~ /^$RealPerl /){
                        $VS->verbose(sprintf($bs, ++$bc));
                        $VB->verbose($_);
                        $VB->hline()

this way whatever perl is used, ALL the inner calls will be performed with the same interpreter.

regards

Eric

@thackl
Copy link
Contributor

thackl commented Feb 22, 2016

I can appreciate the conflicts with your policy and I am sorry about the inconvenience. But at the moment, I do not have time to address them by changing the source code. I was only trying to provide you with quick fix.

I hope you get things running on your system anyway.

@EricDeveaud
Copy link
Author

yes it does when applying the above patch.

I'm so sorry patching your source code may be time consuming for the 2 lines of code to change
maybee you wil prefer a pullrequest ?

@thackl
Copy link
Contributor

thackl commented Feb 22, 2016

Ah, okay, I did not realize that these two changes are already enough to fix everything. I thought that you were just pointing me at the first points of conflict you encountered, and that once I start looking into it, there will be a a lot more to be fixed.. Implementing these minor fixes should not be a problem at all. Thanks

@mmokrejs
Copy link

mmokrejs commented Apr 1, 2018

I do not see this applied to the current tree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants