-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add functionality and documentation for building Conda pacakges.
- Add documentation that links out to external sources for building Conda recipes - recommending specific docs and a specific order. - Allow Planemo to work with locally built Conda packages using the ``--conda_use_local`` command. - Add an exercise to the documentation that requires building a package and the use of ``--conda_use_local``. This uses a new project template that adds a tool targeting the package https://github.com/jmchilton/fleeqtk I forked from seqtk for this purpose. - Update galaxy-lib dependency for the required library functionality to use ``--conda_use_local``. - Add test case that follows the example in the documentation targeting the fleeqtk package. It builds a fleetqk recipe, uses conda_install --conda_use_local on a tool that requires it, and finally runs planemo test to ensure that Galaxy properly uses the resulting package.
- Loading branch information
Showing
23 changed files
with
411 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
"""Module describing the planemo ``conda_build`` command.""" | ||
from __future__ import print_function | ||
|
||
import click | ||
|
||
from planemo import options | ||
from planemo.cli import command_function | ||
from planemo.conda import build_conda_context | ||
|
||
|
||
@click.command('conda_build') | ||
@options.conda_target_options(include_local=False) # No reason to expose local, we have to use it. | ||
@options.recipe_arg(multiple=True) | ||
@command_function | ||
def cli(ctx, paths, **kwds): | ||
"""Perform conda build with Planemo's conda.""" | ||
# Force conda_use_local for building... | ||
kwds["conda_use_local"] = True | ||
conda_context = build_conda_context(ctx, handle_auto_init=True, **kwds) | ||
build_args = list(paths) | ||
conda_context.exec_command("build", build_args) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
99 changes: 99 additions & 0 deletions
99
project_templates/conda_exercises/exercise_2/fleeqtk_seq.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<tool id="fleeqtk_seq" name="Convert to FASTA (fleeqtk)" version="0.1.0"> | ||
<stdio> | ||
<exit_code range="1:" /> | ||
</stdio> | ||
<command><![CDATA[ | ||
fleeqtk seq | ||
#if $settings.advanced == "advanced" | ||
$settings.shift_quality | ||
-q $settings.quality_min | ||
-X $settings.quality_max | ||
#if $settings.mask_regions | ||
-M '$settings.mask_regions' | ||
#end if | ||
#if $settings.sample.sample | ||
-f $settings.sample.fraction | ||
-s $settings.sample.seed | ||
#end if | ||
#end if | ||
-a '$input1' > '$output1' | ||
]]></command> | ||
<inputs> | ||
<param type="data" name="input1" format="fastq" /> | ||
<conditional name="settings"> | ||
<param name="advanced" type="select" label="Specify advanced parameters"> | ||
<option value="simple" selected="true">No, use program defaults.</option> | ||
<option value="advanced">Yes, see full parameter list.</option> | ||
</param> | ||
<when value="simple"> | ||
</when> | ||
<when value="advanced"> | ||
<param name="shift_quality" type="boolean" label="Shift quality" | ||
truevalue="-V" falsevalue="" | ||
help="shift quality by '(-Q) - 33' (-V)" /> | ||
<param name="quality_min" type="integer" label="Mask bases with quality lower than" | ||
value="0" min="0" max="255" help="(-q)" /> | ||
<param name="quality_max" type="integer" label="Mask bases with quality higher than" | ||
value="255" min="0" max="255" help="(-X)" /> | ||
<param name="mask_regions" type="data" label="Mask regions in BED" | ||
format="bed" help="(-M)" optional="true" /> | ||
<conditional name="sample"> | ||
<param name="sample" type="boolean" label="Sample fraction of sequences" /> | ||
<when value="true"> | ||
<param name="fraction" label="Fraction" type="float" value="1.0" | ||
help="(-f)" /> | ||
<param name="seed" label="Random seed" type="integer" value="11" | ||
help="(-s)" /> | ||
</when> | ||
<when value="false"> | ||
</when> | ||
</conditional> | ||
</when> | ||
</conditional> | ||
</inputs> | ||
<outputs> | ||
<data name="output1" format="fasta" /> | ||
</outputs> | ||
<tests> | ||
<test> | ||
<param name="input1" value="2.fastq"/> | ||
<output name="output1" file="2.fasta"/> | ||
</test> | ||
</tests> | ||
<help><![CDATA[ | ||
Usage: fleeqtk seq [options] <in.fq>|<in.fa> | ||
Options: -q INT mask bases with quality lower than INT [0] | ||
-X INT mask bases with quality higher than INT [255] | ||
-n CHAR masked bases converted to CHAR; 0 for lowercase [0] | ||
-l INT number of residues per line; 0 for 2^32-1 [0] | ||
-Q INT quality shift: ASCII-INT gives base quality [33] | ||
-s INT random seed (effective with -f) [11] | ||
-f FLOAT sample FLOAT fraction of sequences [1] | ||
-M FILE mask regions in BED or name list FILE [null] | ||
-L INT drop sequences with length shorter than INT [0] | ||
-c mask complement region (effective with -M) | ||
-r reverse complement | ||
-A force FASTA output (discard quality) | ||
-C drop comments at the header lines | ||
-N drop sequences containing ambiguous bases | ||
-1 output the 2n-1 reads only | ||
-2 output the 2n reads only | ||
-V shift quality by '(-Q) - 33' | ||
-U convert all bases to uppercases | ||
]]></help> | ||
<citations> | ||
<citation type="bibtex"> | ||
@misc{githubfleeqtk, | ||
author = {LastTODO, FirstTODO}, | ||
year = {TODO}, | ||
title = {fleeqtk}, | ||
publisher = {GitHub}, | ||
journal = {GitHub repository}, | ||
url = {https://github.com/jmchilton/fleeqtk}, | ||
}</citation> | ||
</citations> | ||
</tool> |
6 changes: 6 additions & 0 deletions
6
project_templates/conda_exercises/exercise_2/test-data/2.fasta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
>EAS54_6_R1_2_1_413_324 | ||
CCCTTCTTGTCTTCAGCGTTTCTCC | ||
>EAS54_6_R1_2_1_540_792 | ||
TTGGCAGGCCAAGGCCGATGGATCA | ||
>EAS54_6_R1_2_1_443_348 | ||
GTTGCTTCTGGCGTGGGTGGGGGGG |
12 changes: 12 additions & 0 deletions
12
project_templates/conda_exercises/exercise_2/test-data/2.fastq
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
@EAS54_6_R1_2_1_413_324 | ||
CCCTTCTTGTCTTCAGCGTTTCTCC | ||
+ | ||
;;3;;;;;;;;;;;;7;;;;;;;88 | ||
@EAS54_6_R1_2_1_540_792 | ||
TTGGCAGGCCAAGGCCGATGGATCA | ||
+ | ||
;;;;;;;;;;;7;;;;;-;;;3;83 | ||
@EAS54_6_R1_2_1_443_348 | ||
GTTGCTTCTGGCGTGGGTGGGGGGG | ||
+EAS54_6_R1_2_1_443_348 | ||
;;;;;;;;;;;9;7;;.7;393333 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
#!/bin/bash | ||
|
||
export C_INCLUDE_PATH=${PREFIX}/include | ||
export LIBRARY_PATH=${PREFIX}/lib | ||
|
||
make all | ||
mkdir -p $PREFIX/bin | ||
cp -f fleeqtk $PREFIX/bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package: | ||
name: fleeqtk | ||
version: 1.3 | ||
|
||
source: | ||
fn: v1.3.tar.gz | ||
url: https://github.com/jmchilton/fleeqtk/archive/v1.3.tar.gz | ||
md5: 015daf2e21789519eea4e156fc155272 | ||
|
||
build: | ||
number: 0 | ||
|
||
requirements: | ||
build: | ||
- gcc # [not osx] | ||
- llvm # [osx] | ||
- zlib | ||
run: | ||
- zlib | ||
|
||
|
||
about: | ||
home: https://github.com/jmchilton/fleeqtk | ||
license: MIT License | ||
summary: fleeqtk - those sequences are on fleeqtk | ||
|
||
test: | ||
commands: | ||
- fleeqtk seq |
Oops, something went wrong.