fulcrumgenomics / dagr

A scala based DSL and framework for writing and executing bioinformatics pipelines as Directed Acyclic GRaphs
MIT License
69 stars 14 forks source link

Scatter gather flatMap/groupBy fixup #358

Closed nh13 closed 5 years ago

nh13 commented 5 years ago

One could not follow a flatMap directly by a groupBy.

For example:

Scatter(splitByLane)
  .flatMap { lane => 
    // ex. demultiplexes a flowcell for a given lane, and returns
    // a new [[Scatter]] across libraries for the given lane
    DemultiplexByLane(lane).scatterByLibrary
  } // flatMap returns a sequence of libraries across lanes
  .groupBy { library => (library.sampleName, library.libraryId) } // group across all lanes
  .map { case (_, libraries) => CreateSampleBam(libraries) } // merge library across lanes
codecov-io commented 5 years ago

Codecov Report

Merging #358 into master will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #358   +/-   ##
=======================================
  Coverage   91.84%   91.84%           
=======================================
  Files          31       31           
  Lines        1140     1140           
  Branches       71       71           
=======================================
  Hits         1047     1047           
  Misses         93       93

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update b231013...54c1831. Read the comment docs.