Giter VIP home page Giter VIP logo

Comments (8)

wdecoster avatar wdecoster commented on August 16, 2024 2

It seems like you are reinventing a workflow system like snakemake. Maybe that solves the needs that you try to take care of in your python code.

I can also recommend the python shlex module, which you could use to avoid splitting the arguments in a list:

import shlex
cmd_chopper = shlex.split('chopper -l 1 -q 3 --headcrop 30 --tailcrop 30 --threads 12')

from chopper.

wdecoster avatar wdecoster commented on August 16, 2024 1

Hi,

Yes, that would be possible, I will put your request on the list :-)

Wouter

from chopper.

wdecoster avatar wdecoster commented on August 16, 2024 1

Oh, that would be great! :)

from chopper.

Mailinnia avatar Mailinnia commented on August 16, 2024

Any progress on this? :)

I can't implement chopper in my pipeline. I've tried piping with subprocess.Popen, but get the same error.

from chopper.

wdecoster avatar wdecoster commented on August 16, 2024

I can't implement chopper in my pipeline. I've tried piping with subprocess.Popen, but get the same error.

That should work, in principle. Which (python?) code leads to that error?

from chopper.

Mailinnia avatar Mailinnia commented on August 16, 2024

My bad. I found a mistake in my code.

It seems to work doing this:

input1 = 'barcode37.fastq'
cmd_cat = ['cat', input1]
fastq = subprocess.Popen(cmd_cat, stdout=subprocess.PIPE)


cmd_chopper = ['chopper', '-l', '1','-q', '3','--headcrop', '30', '--tailcrop', '30', '--threads', '12']

reads_trim = open('test.fastq', 'w')
chopper = subprocess.Popen(cmd_chopper, stdin=fastq.stdout, stdout=reads_trim)

from chopper.

JMencius avatar JMencius commented on August 16, 2024

Maybe you could consider adding this functionality to make the use of this tool more straightforward?

@wdecoster Any update of this issue? I also found this enhancement to be very useful. But the latest chopper 0.7.0 still do not have the feature.
If you agree, I would be happy to implement this feature and make a PR.

from chopper.

wdecoster avatar wdecoster commented on August 16, 2024

Implemented thanks to @JMencius! I will make a new release soon.

from chopper.

Related Issues (20)

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.