Advertisement
Guest User

Untitled

a guest
Apr 6th, 2017
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.37 KB | None | 0 0
  1. dataDir = "/home/patel/pipelines"
  2.  
  3. params.reads = "$dataDir/unmapped_{1,2}.fastq"
  4. params.genome = "$dataDir/genome.fasta"
  5.  
  6. genome_file = file(params.genome)
  7.  
  8. /*
  9. * Input read files
  10. */
  11.  
  12. Channel
  13. .fromFilePairs(params.reads)
  14. .ifEmpty {error "Cannot find any reads matching: " }
  15. .into{ reads_STAR }
  16.  
  17. process STAR_index {
  18.  
  19. executor 'local'
  20. memory '32 GB'
  21.  
  22. publishDir "$PWD", mode:'copy', overwrite: true
  23.  
  24. input:
  25. file fasta from GENOME
  26.  
  27. output:
  28. file "STAR_genome" into STAR_INDEX
  29.  
  30. """
  31. mkdir -p STAR_genome
  32. STAR --runMode genomeGenerate \
  33. --genomeDir STAR_genome \
  34. --genomeSAindexNbases 3 \
  35. --genomeFastaFiles ${fasta}
  36.  
  37. """
  38. }
  39.  
  40. process STAR_mapping {
  41. executor 'local'
  42. memory '32 GB'
  43. tag $pair_id
  44.  
  45. publishDir ${pair_id}
  46.  
  47. input:
  48. set pair_id, file(reads) from reads_STAR
  49. file starIndex from STAR_INDEX
  50.  
  51. output:
  52. set pair_id, file('Aligned.sortedByCoord.out.bam'), file('Aligned.sortedByCoord.out.bam.bai') into star_out_ch
  53.  
  54. """
  55. STAR --genomeDir starIndex \
  56. --readFilesIn ${reads} \
  57. --outSAMstrandField intronMotif \
  58. --outSAMattributes All \
  59. --outFilterIntronMotifs RemoveNoncanonical \
  60. --outSAMtype BAM SortedByCoordinate
  61. """
  62. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement