Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Use various fgbio functions and classes in your Nextflow scope.

License

Notifications You must be signed in to change notification settings

fulcrumgenomics/nf-fgbio

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nf-fgbio

CI Nextflow Java Versions Nextflow Registry

Use various fgbio functions and classes in your Nextflow scope.

Fulcrum Genomics

Visit us at Fulcrum Genomics to learn more about how we can power your Bioinformatics with nf-fgbio and beyond.

Quickstart

Add the plugin to your Nextflow config:

plugins { id 'nf-fgbio' }

readStructure

A Read Structure refers to a String that describes how the bases in a sequencing run should be allocated into logical reads. The readStructure function converts a string into an fgbio ReadStructure object. This function can be used to validate a read structure, as well as query and manipulate the read structure and its read segments.

For example:

include { readStructure } from 'plugin/nf-fgbio'

channel.of("12M138T", "4M3S12B100T")
  .map { it -> readStructure(it) }
  .map { it -> it.segments() }
  .view()

The above example creates a channel with two read structures (each as strings), converts them into a fgbio ReadStructure object, and returns a vector of read segments for each read structure.

Vector(12M, 138T)
Vector(4M, 3S, 12B, 100T)

fromSampleSheet

The fromSampleSheet factory method parses a sample sheet from a file and returns a list of fgbio Sample data objects. This allows downstream processes to operate per-sample, with sample metadata stored in the Sample object. For example:

include { fromSampleSheet } from 'plugin/nf-fgbio'

channel.fromSampleSheet("/path/to/samplesheet.csv")
  .map { it -> it.sampleName }
  .view()

yields a channel of sample names:

Sample_Name_1
Sample_Name_2
Sample_Name_3
Sample_Name_4
Sample_Name_5
Sample_Name_6
Sample_Name_7
Sample_Name_8
Sample_Name_9
Sample_Name_10
Sample_Name_11
Sample_Name_12

The lane option can be specified to restrict to samples from a specific lane.

channel.fromSampleSheet("/path/to/samplesheet.csv", lane: 1)

Testing the Plugin Locally

Execute the following to run unit tests for the plugin:

make test

To install the plugin for use in local workflows, execute the following:

make install

About

Use various fgbio functions and classes in your Nextflow scope.

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •