Skip to content
Snippets Groups Projects
Select Git revision
  • 062362f888878847539960285b686e05ca49c073
  • main default
  • master protected
  • ci_2025
  • review_2025
  • 2023
6 results

Makefile

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
    """
    }