Coder Social home page Coder Social logo

nf-ffq's Introduction

nf-ffq

Nextflow plugin to fetch fastq samples using ffq.

Get started

The plugin adds a new channel factory called channel.ffq() which can be used to query fastq files.

Note

This plugin requires Nextflow 24.01.0-edge or later.

A simple usage is shown below:

include { ffq } from 'plugin/nf-ffq'

channel
  .ffq('SRR9990627', filetype: 'fastq', links: 'aws')
  .view()

Run it using this command:

nextflow run <your script name> -plugins nf-ffq

It returns:

[SRR9990627, [s3://sra-pub-src-16/SRR9990627/macula_donor_1_S100_L004_R1_001.fastq.gz.1, s3://sra-pub-src-17/SRR9990627/macula_donor_1_S100_L004_R2_001.fastq.gz.1]]

Options

The ffq method can take either a string value representing an accession ID, a string value representing string representing a comma separate list of accession IDs, or a list of string of accession IDs.

The following options can be specified provided:

Option Description
filetype The requested file type, either fastq or sra
links The link type that should be returned, either aws, gcp, ncbi, ftp

Configuration

The plugin adds a new ffq config scope which supports the following options:

Config option Description
ffq.endpoint URL of the ffq-api endpoint

For example:

ffq {
  endpoint = 'https://ffq.seqera.io'
}

Development

Run the following command in the project root directory (ie. where the file settings.gradle is located):

./gradlew check

Run and debug plugin in the development environment

To run and test the plugin in the development environment, configure a local Nextflow build using the following steps:

  1. Clone the Nextflow repository in your computer into a sibling directory:

    git clone --depth 1 https://github.com/nextflow-io/nextflow ../nextflow
    
  2. Instruct the plugin build setting to use the local Nextflow code, adding the following line in the file settings.gradle:

    echo "includeBuild('../nextflow')" >> settings.gradle
    

(make sure to not add it more than once..)

  1. Compile the plugin along the Nextflow code, with this command:

    ./gradlew assemble
    
  2. Run Nextflow with plugins using the ./launch.sh script as a drop-in replacement for the nextflow command and adding the option -plugins nf-ffq to load the built plugin:

    ./launch.sh run ffq.nf -plugins nf-ffq
    

Package, upload and publish

The project should hosted in a GitHub repository whose name should match the name of the plugin, that is the name of the directory in the plugins folder e.g. nf-ffq in this project.

Following these step to package, upload and publish the plugin:

  1. Create a file named gradle.properties in the project root containing the following attributes (this file should not be committed in the project repository):
  • github_organization: the GitHub organisation the plugin project is hosted
  • github_username The GitHub username granting access to the plugin project.
  • github_access_token: The GitHub access token required to upload and commit changes in the plugin repository.
  • github_commit_email: The email address associated with your GitHub account.
  1. The following command, package and upload the plugin in the GitHub project releases page:

    ./gradlew :plugins:nf-ffq:upload
    
  2. Create a pull request against the nextflow-io/plugins project to make the plugin public accessible to Nextflow app.

nf-ffq's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

nf-ffq's Issues

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.