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

tests.sh

Blame
  • indexing.nf 1007 B
    params.fasta = "$baseDir/data/bam/*.fasta"
    params.annotation = "$baseDir/data/bam/*.gff3"
    
    log.info "fasta files : ${params.fasta}"
    
    Channel
      .fromPath( params.fasta )
      .ifEmpty { error "Cannot find any fasta files matching: ${params.fasta}" }
      .set { fasta_file }
    Channel
      .fromPath( params.annotation )
      .ifEmpty { error "Cannot find any annotation files matching: ${params.annotation}" }
      .set { annotation_file }
    
    process index_fasta {
      tag "$fasta.baseName"
      publishDir "results/mapping/index/", mode: 'copy'
    
      input:
        file fasta from fasta_file
        file annotation from annotation_file
    
      output:
        file "*.index*" into index_files
    
      script:
      def cmd_annotation = "--gff3 ${annotation}"
      if(annotation ==~ /.*\.gtf$/){
        cmd_annotation = "--gtf ${annotation}"
      }
    """
    rsem-prepare-reference -p ${task.cpus} --bowtie2 \
    --bowtie2-path \$(which bowtie2 | sed 's/bowtie2\$//g') \
    ${cmd_annotation} ${fasta} ${fasta.baseName}.index > \
    ${fasta.baseName}_rsem_bowtie2_report.txt
    """
    }