Giter Site home page Giter Site logo

antoniojbt / project_quickstart Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 1.01 MB

Boilerplate tools and templates for setting up a data analysis project.

License: GNU General Public License v3.0

Python 64.04% Shell 2.25% R 24.81% Makefile 1.37% Batchfile 1.34% TeX 3.45% Dockerfile 2.74%
data-science data-science-toolbox template-project

project_quickstart's People

Contributors

antoniojbt avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

project_quickstart's Issues

python xxxx/pipeline_pq_example.py plot full requires dot

For the cgat-core based pipeline, the command:
python ../code/pq_example/pipeline_pq_example/pipeline_pq_example.py plot full

gives:

Traceback (most recent call last):
  File "../code/pq_example/pipeline_pq_example/pipeline_pq_example.py", line 473, in <module>
    sys.exit(P.main(sys.argv))
  File "/opt/conda/envs/pq_test/lib/python3.7/site-packages/cgatcore/pipeline/control.py", line 1390, in main
    run_workflow(options, args)
  File "/opt/conda/envs/pq_test/lib/python3.7/site-packages/cgatcore/pipeline/control.py", line 1286, in run_workflow
    checksum_level=options.ruffus_checksums_level)
  File "/opt/conda/envs/pq_test/lib/python3.7/site-packages/ruffus/task.py", line 4137, in pipeline_printout_graph
    signal_callback=is_node_up_to_date)
  File "/opt/conda/envs/pq_test/lib/python3.7/site-packages/ruffus/graph.py", line 1155, in graph_printout
    retcode, cmd + "\n" + "\n".join([str(result_str), str(error_str)]))
subprocess.CalledProcessError: Command 'dot -Gsize='(11,8)'  -Tsvg < /tmp/tmpy87tn_3t.dot
b''
b'/bin/sh: 1: dot: not found\n'' returned non-zero exit status 127.
(pq_test) root@4782c8cbdd5e:/pq_example/results# dot
bash: dot: command not found
  • Add installation instructions

Feedback about example run

Hi Antonio,

Great initiative!

My comments:

Could you please update it?

  • When I follow the installation instructions [1] and run pip install git+git://github.com/AntonioJBT/project_quickstart.git, I get:
ModuleNotFoundError: No module named 'future'

You probably want to add future as a pre-requisite.

  • When I run project_quickstart --example, I get:
UnicodeEncodeError: 'ascii' codec can't encode characters in position 213-215: ordinal not in range(128)

In our systems, this is solved prepending export LANG=en_GB.UTF-8 to project_quickstart but still I get wrong characters as displayed in [2].

I hope it helps!

Best regards,
Sebastian

[1] Installation steps:

mktemp -d 
cd /tmp/tmp.xDXrlY2ka8
curl -O https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -b -p /tmp/tmp.xDXrlY2ka8/i-1
source i-1/etc/profile.d/conda.sh 
conda activate base
conda install future
pip install git+git://github.com/AntonioJBT/project_quickstart.git

[2] Output of "project_quickstart --example":

Welcome to project_quickstart version 0.3.3 (!).

Path in use:
/tmp/tmp.xDXrlY2ka8/i-1/lib/python3.6/site-packages/templates


Creating the project structure for pq_example in:
/tmp/tmp.xDXrlY2ka8/pq_example


 Done, welcome to pq_example!

        Folders and files have been copied to:
        /tmp/tmp.xDXrlY2ka8/pq_example

        The basic structure is:
                              .
                              ��������� code
                              ��������� data
                              ��������� documents_and_manuscript
                              ��������� results

        Remember to back up code, data and manuscript directories (or your
        equivalents).

        The directory:
        /tmp/tmp.xDXrlY2ka8/pq_example/code

        can be uploaded to a version control system (file templates are for GitHub).
        You could link it to Travis CI, Zenodo and ReadtheDocs for example.
        There are some notes and reminders within the files copied over.
        You may want to change the name 'code' to something more suitable when
        uploading, freezing, packaging, etc.

        Script templates are in:
        /tmp/tmp.xDXrlY2ka8/pq_example/code/pq_example

        The structure largely follows Python packaging conventions.
        You can put scripts, modules and pipelines (eg Ruffus/CGAT, make and Makefiles, etc.)
        in here.

        You can work and save results in:
        /tmp/tmp.xDXrlY2ka8/pq_example/results

        Install Sphinx to render your rst documents in:
        /tmp/tmp.xDXrlY2ka8/pq_example/documents_and_manuscript

        Basic rst template files have been generated already.
        Install and use sphinx-quickstart if you want a more complete skeleton.

        Feel free to raise issues, fork or contribute at:

        https://github.com/AntonioJBT/project_quickstart

        Have fun!

latexmk and perl conda conflict

Install separate conda environment for building reports to avoid perl and latexmk conflict:

Install latex and requirements for report building:
bash -c 'conda install -y sphinxcontrib-bibtex' # for both pdf and html reports
bash -c 'conda install -y texlive-core latexmk perl-local-lib perl==5.20.3.1' # for pdf reports
latexmk and perl may conflict though (unsatisfiable error...)
latexmk is needed for make latexpdf but needs perl 5.20.3.1
perl-local-lib needs perl > 5.26.2
perl and perl local::lib are needed for latex and sphinx report building, perl without local::lib gives compilation errors and missing modules
This only affects latex and pdf building though, html reports are fine

missing tests

For:

  • toy example scripts
  • bash pipeline
  • cgat pipeline

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.