Skip to content
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

Cyclic dependency for make bmat #7

Open
Zepeng-Mu opened this issue Apr 28, 2019 · 3 comments
Open

Cyclic dependency for make bmat #7

Zepeng-Mu opened this issue Apr 28, 2019 · 3 comments

Comments

@Zepeng-Mu
Copy link

Hi, I think it makes sense to put the binary matrix in the same snap file as input. However, this can create a "cyclic dependency" when using tools like snakemake, because the input name and the output name are the same.

Is there any way to circumvent this?

Many thanks

@r3fang
Copy link
Owner

r3fang commented Apr 28, 2019

Hi Zepeng,

Thanks for trying! I don't use snalemake myself but one of my labmate does and he has figured this out, i will ask him tomorrow and get you back tomorrow.

R

@r3fang
Copy link
Owner

r3fang commented Apr 29, 2019

Hi Zepeng,

I get back from my lab mate, he just create another file as output {dissection}/{dataset}/{dataset}.snap.add_bmat.ok

rule snap_add_bmat:
    input:
        snap="{dissection}/{dataset}/{dataset}.snap"
    output:
        "{dissection}/{dataset}/{dataset}.snap.add_bmat.ok"
    params:
        jobname = "{dataset}.snap_add_bmat"
    benchmark:
        "benchmarks/{dissection}/{dataset}.snap_add_bmat.benchmark"
    log:
        "log/{dissection}/{dataset}.snap_add_bmat.log"
    shell:
        """
        /home/yangli1/apps/anaconda2/bin/snaptools snap-add-bmat \
        --snap-file={input.snap} \
        --bin-size-list 1000 5000 10000 \
        --verbose=True &> {log}
        echo "Done" > {output}
        """

Let me know if this does not solve your question

@Zepeng-Mu
Copy link
Author

Yeah, I actually also thought about this, this seems to be the only way.
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants