Saltar a contenido

Develop with CoScientist

Translation in Progress

This page has not yet been translated into your language. You are viewing the original English content.

Want to help? See our translation guide.

Adding a step to a pipeline normally means finding a tool, writing a process, wiring its inputs and outputs, and getting the change reviewed. CoScientist can do that legwork for you, and the developer journey starts here, still in the web chat. You fork rnaseq-nf, give CoScientist scoped access to your fork, and have it add a new process by reusing an nf-core module and open a pull request, letting it work until the change is done.


1. Fork rnaseq-nf.

Fork the pipeline into your own GitHub account so you have a copy to change, and so you can scope CoScientist's access to just this repository. On GitHub, open nextflow-io/rnaseq-nf and select Fork.

Checkpoint

The repository your-user/rnaseq-nf exists on your GitHub account.

2. Give CoScientist access to your fork.

CoScientist commits changes and opens pull requests on your behalf using a GitHub token. Create a fine-grained personal access token scoped to only your fork, rather than a broad token, so the agent can touch nothing else.

On GitHub, go to Settings → Developer settings → Personal access tokens → Fine-grained tokens and generate a token with:

  • Repository access: only your rnaseq-nf fork
  • Permissions: Contents (read and write) and Pull requests (read and write)

Add the token to your CoScientist session by clicking your name at the bottom left and selecting GitHub access token. After adding the token, start a new session so CoScientist picks it up; an existing session keeps using the old token.

Checkpoint

CoScientist reports that it can access your fork.

3. Add a trimming step and open a pull request.

Ask CoScientist to add a fastp read-trimming step before quantification, reusing the nf-core fastp module, and to open a pull request with the change:

In my fork of rnaseq-nf, add a fastp read-trimming step before quantification, reusing the nf-core fastp module, wire its trimmed reads into the QUANT process, and open a pull request. My GitHub user is '<your github user>'.

Reusing the nf-core module keeps the work small: CoScientist pulls in a tested process and mainly has to get the input and output wiring right, rather than reimplementing fastp. This exercises its nf-core module discovery.

What CoScientist typically does

It finds the nf-core/fastp module, adds it under modules/nf-core/fastp/, wires the trimmed reads into the workflow, commits to a branch on your fork, and opens a pull request titled something like "add fastp trimming step before quantification". The exact wording will differ from run to run.

4. Let the agent work until it is done.

Adding a process rarely lands in one attempt. Let CoScientist iterate: when something is wrong it adjusts the wiring and tries again, until the change is complete and the pull request is open. Keep it on track with the habits from the previous lesson: check what it changed, and redirect it if it goes too far.

Checkpoint

A pull request with the fastp step is open on your fork.

Takeaway

Working entirely in the web chat, you connected GitHub, forked rnaseq-nf, and had CoScientist add a real processing step by reusing an nf-core module and open a pull request.

What's next?

In the next lesson, move to the CLI to test the change and see why the CLI suits development work.