Giter Site home page Giter Site logo

conda running code about hapo-g HOT 5 CLOSED

desmodus1984 avatar desmodus1984 commented on September 26, 2024
conda running code

from hapo-g.

Comments (5)

bistace avatar bistace commented on September 26, 2024

Hello,

on conda, you can just invoke hapog.py as it will be in your PATH.

from hapo-g.

desmodus1984 avatar desmodus1984 commented on September 26, 2024

Hello,

on conda, you can just invoke hapog.py as it will be in your PATH.

Hi I ran the following command:
hapog --genome /users/PHS0338/jpac1984/data/SuperExt.scaff.fasta # Fasta file of the genome to polish
-b ../MaSuRCA-4.0.5/TGI_myse/SuperExt.scaff.fasta.alignSorted.bam -o myse -t 48

and I got the following message:
usage: hapog [-h] --genome INPUT_GENOME [--pe1 PE1] [--pe2 PE2]
[--single LONG_READS] [-b BAM_FILE] [-u] [--output OUTPUT_DIR]
[--threads THREADS] [--bin HAPOG_BIN]
hapog: error: unrecognized arguments:
/var/spool/slurmd/job5287196/slurm_script: line 12: -b: command not found

What am I doing wrong?

from hapo-g.

bistace avatar bistace commented on September 26, 2024

Hi,

if you copied and pasted the entire command line you ran in your previous comment, you have forgotten to include line breaks. Basically, bash will understand that you tried to run the following two commands:

First one:

hapog --genome /users/PHS0338/jpac1984/data/SuperExt.scaff.fasta # Fasta file of the genome to polish

Second one:

-b ../MaSuRCA-4.0.5/TGI_myse/SuperExt.scaff.fasta.alignSorted.bam -o myse -t 48

As you can see, these are probably not the ones you intended to run.

Instead, I recommend that you run (assuming the input files are correct):

hapog --genome /users/PHS0338/jpac1984/data/SuperExt.scaff.fasta  -b ../MaSuRCA-4.0.5/TGI_myse/SuperExt.scaff.fasta.alignSorted.bam -o myse -t 48

You can also use this multi-lines version (notice the new line breaks):

hapog --genome  /users/PHS0338/jpac1984/data/SuperExt.scaff.fasta \
    -b ../MaSuRCA-4.0.5/TGI_myse/SuperExt.scaff.fasta.alignSorted.bam \
    -o myse \
    -t 48

from hapo-g.

desmodus1984 avatar desmodus1984 commented on September 26, 2024

Hi,

if you copied and pasted the entire command line you ran in your previous comment, you have forgotten to include line breaks. Basically, bash will understand that you tried to run the following two commands:

First one:

hapog --genome /users/PHS0338/jpac1984/data/SuperExt.scaff.fasta # Fasta file of the genome to polish

Second one:

-b ../MaSuRCA-4.0.5/TGI_myse/SuperExt.scaff.fasta.alignSorted.bam -o myse -t 48

As you can see, these are probably not the ones you intended to run.

Instead, I recommend that you run (assuming the input files are correct):

hapog --genome /users/PHS0338/jpac1984/data/SuperExt.scaff.fasta  -b ../MaSuRCA-4.0.5/TGI_myse/SuperExt.scaff.fasta.alignSorted.bam -o myse -t 48

You can also use this multi-lines version (notice the new line breaks):

hapog --genome  /users/PHS0338/jpac1984/data/SuperExt.scaff.fasta \
    -b ../MaSuRCA-4.0.5/TGI_myse/SuperExt.scaff.fasta.alignSorted.bam \
    -o myse \
    -t 48

Hi,

I just did that; I used the following code:

hapog --genome /users/PHS0338/jpac1984/data/SuperExt.scaff.fasta \
        -b /fs/scratch/PHS0338/appz/MaSuRCA-4.0.5/TGI_myse/SuperExt.scaff.fasta.alignSorted.bam \
        -o myse \
        -t 48

I even checked if hapo-g was installed in conda and it is, and I got the following error:
/var/spool/slurmd/job5303212/slurm_script: line 11: hapog: command not found

I am very confused because, when it was close to work the error was:
usage: hapog [-h] --genome INPUT_GENOME [--pe1 PE1] [--pe2 PE2]
[--single LONG_READS] [-b BAM_FILE] [-u] [--output OUTPUT_DIR]
[--threads THREADS] [--bin HAPOG_BIN]
hapog: error: unrecognized arguments:
/var/spool/slurmd/job5287196/slurm_script: line 12: -b: command not found

and now I am using hapog and it is not running.

from hapo-g.

bistace avatar bistace commented on September 26, 2024

Hello,

this is weird. I just checked on my system with a fresh installation and everything seems to work.

Here is what I think you should do:

  1. Create a fresh conda env for hapog (make sure you are in the base env while running this):
conda env remove --name hapog (replace hapog by the name of your conda env)
conda create -n hapog
conda activate hapog
conda install -c lbgb_cea hapog
  1. Execute hapog by invoking hapog.pywhich is the wrapper script (make sure that you are in the hapog conda env that you just created and installed hapog into):
hapog.py --genome /users/PHS0338/jpac1984/data/SuperExt.scaff.fasta \
        -b /fs/scratch/PHS0338/appz/MaSuRCA-4.0.5/TGI_myse/SuperExt.scaff.fasta.alignSorted.bam \
        -o myse \
        -t 48

from hapo-g.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.