Skip to content
Snippets Groups Projects
Select Git revision
  • f19a3ec0c9b7c991ed8e935124140f4dec0c5da0
  • master default protected
  • dtorresc-master-patch-32428
  • dev
  • v0.4.0
  • v0.3.0
  • v0.2.9
  • v0.2.8
  • v0.2.7
  • v0.2.6
  • v0.1.0
  • v0.2.5
  • v0.2.4
  • v0.2.3
  • v0.2.2
  • v0.2.1
  • v0.2.0
  • v0.1.2
18 results

pipeline_PSMN.nf

Blame
  • Forked from LBMC / nextflow
    Source project has a limited visibility.
    split_bams.nf 537 B
    params.bam = "$baseDir/data/bam/*.bam"
    
    log.info "bams files : ${params.bam}"
    
    Channel
      .fromPath( params.bam )
      .ifEmpty { error "Cannot find any bam files matching: ${params.bam}" }
      .set { bam_files }
    
    process split_bam {
      tag "$bam.baseName"
      cpus 2
    
      input:
        file bam from bam_files
    
      output:
        file "*_forward.bam*" into forward_bam_files
        file "*_reverse.bam*" into reverse_bam_files
      script:
    """
    samtools view -hb -F 0x10 ${bam} > ${bam}_forward.bam &
    samtools view -hb -f 0x10 ${bam} > ${bam}_reverse.bam
    """
    }