PhaME icon indicating copy to clipboard operation
PhaME copied to clipboard

SAMtools 1.15 is a more recent release than 1.3.

Open davidjstudholme opened this issue 3 years ago • 5 comments

This issue is similar to, but distinct from issue #11.

I have installed PhaME via conda and when I attempt to execute it, I get: [13:18:16] Need samtools --version >= 1.3 but you have 1.15 - please upgrade it.

Now, based on the list of releases on the SAMtools GitHub repo, version 1.15 is indeed more recent than (>) 1.3. So, I am not sure whether this is an issue with PhaME or whether SAMtools is using an unorthodox releasing numbering scheme. Either way, PhAME is incorrectly inferring that the SAMtools version is too old.

davidjstudholme avatar Aug 05 '22 13:08 davidjstudholme

OK, I resorted to going in and editing the code of phame lines 157 and 158:

    parse_version( 'samtools --version', 1.15,   qr/samtools\s(\d+\.\d+)/ms );
    parse_version( 'bcftools --version', 1.15,   qr/bcftools\s(\d+\.\d+)/ms );

That seems to have done the job :-)

davidjstudholme avatar Aug 05 '22 15:08 davidjstudholme

Thank you David. Are you using phame that came with the conda installation or the latest version from github?

mshakya avatar Aug 09 '22 18:08 mshakya

@mshakya. thanks for the reply. Yes, I am using the version installed via conda. I can provide paths, version numbers etc. if required.

davidjstudholme avatar Aug 16 '22 19:08 davidjstudholme

HI @davidjstudholme and @mshakya , I am having the same problem: PHaME complains "Need samtools --version >= 1.3 but you have 1.19 - please upgrade it." There seem to be 2 possible solutions, but I can't get either to work. (Apologies if answers are obvious, I'm not a developer)

  1. Install PHaME 1.0.4: I installed PHaME using "conda install phame", which according to phame -v gave me version 1.0.2. I can see in the notes for the Github version history that in phame 1.0.4, the version checking was updated. However, conda install and conda update will only get me 1.0.2. Oddly, the folder in miniconda/base/pkgs is phame-1.0.3-1, which is none of the above.

I've tried "conda update" and "conda install phame=1.0.3", but "phame -v" always gives me 1.0.2, and the dependencies are still a problem. Is there a way to resolve the phame versions discrepancy and get the newest, fixed version into miniconda?

  1. Manually edit the phame executable I tried the above trick of editing the phame file to set the samtools and bcftools dependencies to version 1.15. But this does not seem to do anything. I saved the file, closed and reactivated the environment, and opened a new terminal, but the change is not taking effect. Is there an extra step to get this to work?

robmcooper avatar Mar 22 '24 02:03 robmcooper

Hey @robmcooper . I did some trouble shooting and this is what worked for me

clone repo git clone https://github.com/LANL-Bioinformatics/PhaME.git

create and activate an evironment conda create -n phame_env conda activate phame_env

install phame conda install phame

try the test file

cd PhaME
test/Testall 1

The test worked for me, if it works than proceed to creating .ctl file and running it as normal

if samtools error proceed to check samtools version making sure v1.3 or greater samtools --version

check bcftools making sure v1.3 or greater bcftools --version

if bcftools --version returns this error bcftools: symbol lookup error: /usr/lib/libgsl.so.25: undefined symbol: cblas_ctrmv then need to install older version of GSL with mamba install -c conda-forge gsl=2.5

test/Testall 1 should work now

if it still doesn't open phame executable comment out lines 162 and 163

nano /home/dremtz/PhaME_revamp/src/phame

sub check_version {
    #parse_version( 'samtools --version', 1.3,   qr/samtools\s(\d+\.\d+)/ms );
    #parse_version( 'bcftools --version', 1.3,   qr/bcftools\s(\d+\.\d+)/ms );
    parse_version( 'nucmer --version',   3.1,   qr/version\s(\d+\.\d+)/ms );
    parse_version( 'bowtie2 --version',  2.3,   qr/version\s(\d+\.\d+)/ms );
    parse_version( 'bwa',                0.7,   qr/Version:\s(\d+\.\d+)/ms );
    parse_version( 'FastTree -expert',   2.1,   qr/FastTree\s(\d+\.\d+)/ms );
    parse_version( 'bbmap.sh -v',        38.06, qr/Version\s(\d+\.\d+)/ms );
    parse_version( 'raxmlHPC-PTHREADS -version',
        8.2, qr/version\s(\d+\.\d+)/ms );
    print_timeInterval( $runtime, "Dependencies look good!\n" );

  Then save script, close terminal, reopen and run test/Testall 1 again from PhaME directory.

I hope this helps. Cheers

Andreas-Martinez avatar Mar 26 '24 22:03 Andreas-Martinez