chollenbeck / rad_haplotyper

MIT License
7 stars 5 forks source link

Vcf module problem #26

Closed MPvdBurg closed 6 years ago

MPvdBurg commented 6 years ago

Hi,

Let me first say I'm a programming roocky, although I'm learning :) I am having an issue with setting up my laptop (Mac) to run the rad_haplotyper script. I downloaded all Perl modules but when I run the script in the 'snp filtering' tutorial I get this message:

$ perl rad_haplotyper.pl -v SNP.DP3g95p5maf05.HWE.recode.vcf -x 40 -mp 1 -u 20 -ml 4 -n -r reference.fasta
Subroutine validate redefined at /Library/Perl/5.18/Vcf.pm line 94.
Subroutine validate_v32 redefined at /Library/Perl/5.18/Vcf.pm line 117.
Subroutine new redefined at /Library/Perl/5.18/Vcf.pm line 147.
Subroutine throw redefined at /Library/Perl/5.18/Vcf.pm line 175.
Ambiguous call resolved as CORE::warn(), qualify as such or use & at /Library/Perl/5.18/Vcf.pm line 185.
Subroutine warn redefined at /Library/Perl/5.18/Vcf.pm line 181.
Ambiguous call resolved as CORE::open(), qualify as such or use & at /Library/Perl/5.18/Vcf.pm line 222.
Subroutine _open redefined at /Library/Perl/5.18/Vcf.pm line 189.
Subroutine open redefined at /Library/Perl/5.18/Vcf.pm line 249.
Ambiguous call resolved as CORE::close(), qualify as such or use & at /Library/Perl/5.18/Vcf.pm line 269.
Subroutine close redefined at /Library/Perl/5.18/Vcf.pm line 266.
Subroutine next_line redefined at /Library/Perl/5.18/Vcf.pm line 286.
Subroutine _unread_line redefined at /Library/Perl/5.18/Vcf.pm line 316.
Subroutine next_data_array redefined at /Library/Perl/5.18/Vcf.pm line 334.
Subroutine set_samples redefined at /Library/Perl/5.18/Vcf.pm line 358.
Subroutine _set_version redefined at /Library/Perl/5.18/Vcf.pm line 386.
Removed 0 loci (0 SNPs) with more than 20 SNPs at a locus
Can't locate object method "new" via package "Vcf" (perhaps you forgot to load "Vcf"?) at rad_haplotyper.pl line 176.

When I check whether I have the Vcf module, this returns:

$ perl -e "use Vcf "
Subroutine validate redefined at /Library/Perl/5.18/Vcf.pm line 94.
Subroutine validate_v32 redefined at /Library/Perl/5.18/Vcf.pm line 117.
Subroutine new redefined at /Library/Perl/5.18/Vcf.pm line 147.
Subroutine throw redefined at /Library/Perl/5.18/Vcf.pm line 175.
Ambiguous call resolved as CORE::warn(), qualify as such or use & at /Library/Perl/5.18/Vcf.pm line 185.
Subroutine warn redefined at /Library/Perl/5.18/Vcf.pm line 181.
Ambiguous call resolved as CORE::open(), qualify as such or use & at /Library/Perl/5.18/Vcf.pm line 222.
Subroutine _open redefined at /Library/Perl/5.18/Vcf.pm line 189.
Subroutine open redefined at /Library/Perl/5.18/Vcf.pm line 249.
Ambiguous call resolved as CORE::close(), qualify as such or use & at /Library/Perl/5.18/Vcf.pm line 269.
Subroutine close redefined at /Library/Perl/5.18/Vcf.pm line 266.
Subroutine next_line redefined at /Library/Perl/5.18/Vcf.pm line 286.
Subroutine _unread_line redefined at /Library/Perl/5.18/Vcf.pm line 316.
Subroutine next_data_array redefined at /Library/Perl/5.18/Vcf.pm line 334.
Subroutine set_samples redefined at /Library/Perl/5.18/Vcf.pm line 358.
Subroutine _set_version redefined at /Library/Perl/5.18/Vcf.pm line 386.

So it seems I do have the module, but it doesn't work. I was wondering whether people have similar issues with the Vcf module on Mac?

Thanks in advance, Thijs

chollenbeck commented 6 years ago

Hi Thijs,

Have you tried installing rad_haplotyper using conda (see the instructions in the README)? That should help with the dependency issues.

Chris

MPvdBurg commented 6 years ago

Hi Chris,

Yes I did, but that didn't work for me so I tried the older(?) way.

I used

conda config --add channels r
conda config --add channels defaults
conda config --add channels conda-forge
conda config --add channels bioconda

Then $ conda install rad_haplotyper Gives me

PackageNotFoundError: Packages missing in current channels:

  - rad_haplotyper

We have searched for the packages in the following channels:

  - https://conda.anaconda.org/bioconda/osx-64
  - https://conda.anaconda.org/bioconda/noarch
  - https://conda.anaconda.org/conda-forge/osx-64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.continuum.io/pkgs/main/osx-64
  - https://repo.continuum.io/pkgs/main/noarch
  - https://repo.continuum.io/pkgs/free/osx-64
  - https://repo.continuum.io/pkgs/free/noarch
  - https://repo.continuum.io/pkgs/r/osx-64
  - https://repo.continuum.io/pkgs/r/noarch
  - https://repo.continuum.io/pkgs/pro/osx-64
  - https://repo.continuum.io/pkgs/pro/noarch

Same holds for $ conda install -c bioconda rad_haplotyper and conda create -n rad_haplotyper_env rad_haplotyper

Best, Thijs

jpuritz commented 6 years ago

Hi Thijs,

Right now, the bioconda install is limited to Linux and not OS X. Sorry.

Jon

-- Jon Puritz

On November 27, 2017 at 16:40:03, ThijsvandenBurg (notifications@github.com) wrote:

Hi Chris,

Yes I did, but that didn't work for me so I tried the older(?) way.

I used

conda config --add channels r conda config --add channels defaults conda config --add channels conda-forge conda config --add channels bioconda

Then $ conda install rad_haplotyper Gives me

PackageNotFoundError: Packages missing in current channels:

  • rad_haplotyper

We have searched for the packages in the following channels:

Same holds for $ conda install -c bioconda rad_haplotyper and conda create -n rad_haplotyper_env rad_haplotyper

Best, Thijs

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/chollenbeck/rad_haplotyper/issues/26#issuecomment-347337187, or mute the thread https://github.com/notifications/unsubscribe-auth/AEnRR_PIu32CW7ZADp4c5zPdTHbbj8urks5s6ywzgaJpZM4QrfGe .

chollenbeck commented 6 years ago

I don't recognize the error, but maybe there are multiple versions of the Vcf.pm module in the path? If you install a fresh version of vcftools with conda or brew, do you get the same error?

conda create -n vcftools_env vcftools
source activate vcftools_env
vcftools --version
MPvdBurg commented 6 years ago

Hi Chris,

$ vcftools --version
VCFtools (0.1.15)

Still gives the same error, yes.

chollenbeck commented 6 years ago

Were you able to check if you have two Vcf.pm modules in the path?

MPvdBurg commented 6 years ago

There were no additional in my path except the one in /Library/Perl/5.18/Vcf.pm which it keeps redefining. Just to be sure I removed the ones on my laptop, still same result.

chollenbeck commented 6 years ago

Did you download Vcf.pm manually or did you use the one that installs with vcftools?