Skip to content
Snippets Groups Projects
Select Git revision
  • f7f61d07eeb0f0c7df230dd30cfdcf29cc9a46ea
  • master default protected
  • 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
17 results

mapping_single.nf

Blame
  • Forked from LBMC / nextflow
    Source project has a limited visibility.
    indexing.nf 738 B
    /*                      fasta indexing                                     */
    
    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:
    """
    bowtie-build --threads ${task.cpus} -f ${fasta} ${fasta.baseName}.index &> ${fasta.baseName}_bowtie_report.txt
    
    if grep -q "Error" ${fasta.baseName}_bowtie_report.txt; then
      exit 1
    fi
    """
    }