Skip to content
Snippets Groups Projects
Select Git revision
  • f7f61d07eeb0f0c7df230dd30cfdcf29cc9a46ea
  • master default protected
  • dev
  • v2.0.0
  • 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

htseq.nf

Blame
  • htseq.nf 936 B
    /*
    * htseq :
    * Imputs : sorted bams files
    * Imputs : gtf
    * Output : counts files
    */
    /*                      quality trimming                                     */
    
    params.bam = "$baseDir/data/bam/*.bam"
    params.gtf = "$baseDir/data/annotation/*.gtf"
    
    log.info "bam files : ${params.bam}"
    log.info "gtf files : ${params.gtf}"
    
    Channel
      .fromPath( params.bam )
      .ifEmpty { error "Cannot find any fastq files matching: ${params.bam}" }
      .set { bam_files }
    Channel
      .fromPath( params.gtf )
      .ifEmpty { error "Cannot find any gtf file matching: ${params.gtf}" }
      .set { gtf_file }
    
    process counting {
      tag "$bam.baseName"
      publishDir "results/quantification/", mode: 'copy'
    
      input:
      file bam from bam_files
      file gtf from gtf_file
    
      output:
      file "*.count" into count_files
    
      script:
    """
    htseq-count -r pos --mode=intersection-nonempty -a 10 -s no -t exon -i gene_id \
    --format=bam ${bam} ${gtf} > ${bam.baseName}.count
    """
    }