Skip to content
Snippets Groups Projects
Select Git revision
  • 339a3a624bf934ed69a5a370e7102832b3b00b34
  • 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

nf_projects.md

Blame
  • indexing.nf 660 B
    params.fasta = "$baseDir/data/bam/*.fasta"
    
    log.info "fasta files : ${params.fasta}"
    
    Channel
      .fromPath( params.fasta )
      .ifEmpty { error "Cannot find any bam files matching: ${params.fasta}" }
      .set { fasta_file }
    
    process index_fasta {
      tag "$fasta.baseName"
      publishDir "results/mapping/index/", mode: 'copy'
    
      input:
        file fasta from fasta_file
    
      output:
        file "*.index*" into index_files
        file "*_report.txt" into indexing_report
    
      script:
    """
    bowtie2-build --threads ${task.cpus} ${fasta} ${fasta.baseName}.index &> ${fasta.baseName}_bowtie2_report.txt
    
    if grep -q "Error" ${fasta.baseName}_bowtie2_report.txt; then
      exit 1
    fi
    """
    }