New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: cooltools wrappers #519
Conversation
Hi @Phlya, and thanks for your contributions! Made some suggestions. If they make sense, can you also apply them on the other wrappers? Also, does |
Thank you for the comments @fgvieira! I'll look through them carefully. I don't think any of the tools use a temporary directory or any temporary files, but I'll check. Does it need to be treated in a special way somehow? |
If they use a temporary folder, use python's |
Co-authored-by: Filipe G. Vieira <fgarrettvieira@gmail.com>
Co-authored-by: Filipe G. Vieira <fgarrettvieira@gmail.com>
Co-authored-by: Filipe G. Vieira <fgarrettvieira@gmail.com>
I tried not specifying any dependencies in the environment and it seems to work fine! I think now this is ready for merging? |
I think it looks good, apart from "range" where I hope @johanneskoester can give some input. |
Thank you! I could make something nicer for the range, but I think in the next version it won't be a required argument anymore, so don't want to invest too much into dealing with it. |
So after all I added the final wrapper that I was having problems with earlier. |
I removed the import where things were failing... But it shouldn't have failed anyway, that package should be installed as a dependency. |
Why is it failing when importing in the Snakefile? |
Ah I guess the environment is only activated within the execution of the rule! Oh that's tricky, is there a recommended way to circumvent that? The test data is too big to be in the repo and needs to be downloaded, and the normal way to do it is using the cooltools package... |
Can you make a smaller dummy test dataset? |
In principle yes. |
Then it should be fine for testing purposes. |
OK thanks, I did it. |
Hi, do we need @johanneskoester to approve the solution for "range"? I'd like for this to be merged soon... |
Yeah, I'd like to hear his opinion on the "range" solution. |
Sorry for being late to the party. I have a look now. |
"CN_{resolution,[0-9]+}.saddledump.npz", | ||
params: | ||
## Add optional parameters | ||
range="--qrange 0.01 0.99", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is ok.
Thanks a lot @johanneskoester ! |
Description
Added the first wrapper to cooltools, chose to try with
cooltools insulation
to see how it works.ADD: now also added two more wrappers, will add more.
I think I did everything correctly, but it's my first time :)
QC
For all wrappers added by this PR, I made sure that
input:
andoutput:
file paths in the resulting rule can be changed arbitrarily,threads: x
statement withx
being a reasonable default,map_reads
for a step that maps reads),environment.yaml
specifications follow the respective best practices,input:
oroutput:
),Snakefile
s and their entries are explained via comments (input:
/output:
/params:
etc.),stderr
and/orstdout
are logged correctly (log:
), depending on the wrapped tool,tempfile.gettempdir()
points to (see here; this also means that using any Pythontempfile
default behavior works),meta.yaml
contains a link to the documentation of the respective tool or command,Snakefile
s pass the linting (snakemake --lint
),Snakefile
s are formatted with snakefmt,