DavidsonGroup / flexiplex

The Flexible Demultiplexer
https://davidsongroup.github.io/flexiplex/
MIT License
23 stars 2 forks source link

Add conda test for demultipex outputs; trim polyT #25

Closed ChangqingW closed 4 months ago

ChangqingW commented 8 months ago

Adds conda tests for demultiplex outputs using sample of reads from https://github.com/mritchielab/FLAMES/tree/devel/inst/extdata/fastq and verify outputs.

Trim remaining polyT from the start of the reads with seq.find_first_not_of('T', result.endLocations[0]). Should probably make this optional now that the user could define not to use polyT. Maybe with -t to enable trimming? I don't think this is worth generalising to allow trimming A/T from either start or end of the reads though, one could probably just pipe outputs to cutadapt, which would have better performance.

olliecheng commented 8 months ago

Have you tried testing this locally using bioconda-utils? I had a bad experience with the tool (as I'm on an M1 Mac) but it might still be worthwhile seeing if the tests pass. You may run into bundling issues, that's normal and should be fine when built on the bioconda stack

ChangqingW commented 8 months ago

The tests passed on my branch (The MacOS tests failing initially is why I noticed the segfault issue)

olliecheng commented 8 months ago

Yes, I noticed this (phew, I'm glad the GH Actions still work! Conda is such a mess...)

Bioconda-utils will lint and build using the bioconda pipeline, isolating it using Docker, to replicate the actual build pipeline that bioconda uses. I noticed when first setting up the bioconda package, that the actual build process would sometimes not work using an existing conda build, despite the conda build working fine... hence it might be a good idea to test it, just in case.

The CI action just runs conda-build instead of using bioconda-utils.

On the link above they recommend something like this:

# You can use "conda create" here instead, if you don't have mamba installed
mamba create -n bioconda -c conda-forge -c bioconda bioconda-utils

conda activate bioconda

# optional linting
bioconda-utils lint --git-range master

# build and test
bioconda-utils build --docker --mulled-test --git-range master
ChangqingW commented 8 months ago

Apparently lint is expecting me to bump the version number:

ERROR: recipes/flexiplex/meta.yaml:12: build_number_needs_bump: The recipe build number should be incremented

And build is expecting the bumped version to be found in flexiplex/releases:

An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
WARNING:conda_build.source:Error: HTTP 404 NOT FOUND for url <https://github.com/DavidsonGroup/flexiplex/releases/download/Version-0.97.2/flexiplex-Version-0.97.2.tar.gz>
Elapsed: 00:00.347121

I am very new to contributing to conda so don't know how one can get around this

olliecheng commented 8 months ago

Ah, no stress. I'll check this PR next time I'm in the office 👍