Skip to content

Instantly share code, notes, and snippets.

View dpryan79's full-sized avatar

Devon Ryan dpryan79

  • Genedata AG
  • Basel, Switzerland / Freiburg, Germany
View GitHub Profile
@dpryan79
dpryan79 / subsetBigWig.py
Created July 31, 2019 16:18
Subset a bigwig file
#!/usr/bin/env python
import pyBigWig
import argparse
import os.path
import sys
parser = argparse.ArgumentParser(description="Subset a single chromosome from a bigWig file.")
parser.add_argument("--headerToo", action="store_true", help="Subset the header too, which can expedite some downstream programs but possibly cause problems for others.")
parser.add_argument("input", help="Input bigWig file.")
parser.add_argument("output", help="Output bigWig file.")
@dpryan79
dpryan79 / iterative.nf
Created December 22, 2022 09:42
Iterative with connected inputs/outputs
rawFastqs = Channel.fromFilePairs(['data/*_{1,2}.fastq.gz', 'data/*_R{1,2}.fastq.gz'])
databases = Channel.of(['label1', '/some/path/database'], ['label2', '/some/other/path/database'], ...)
/+
The general structure of what I'd like to achieve, just without manually putting in all of the someProcess() calls
That won't work for a variety of reasons, among them being that someProcess() would need an alias each time
*/
workflow {
someProcess(rawFastqs, databases.first())
someProcess(someProcess.out.fastq, databases[2])