#NEWLINE# @ follows ( mkdir ( 'metaphlan.dir' ) ) #NEWLINE# @ transform ( SEQUENCEFILES , SEQUENCEFILES_REGEX , 'metaphlan.dir/\\1.readmap' ) #NEWLINE# def buildMetaphlanReadmap( infile , outfile ) : #NEWLINE# #INDENT# '\n    metaphlan is a program used in metagenomics. It assigns\n    reads to clades based on specific genetic markers via \n    blastn searching\n    ' #NEWLINE# to_cluster = True #NEWLINE# if ( PARAMS [ 'metaphlan_executable' ] == 'bowtie2' ) : #NEWLINE# #INDENT# assert os . path . exists ( ( PARAMS [ 'metaphlan_db' ] + '.1.bt2' ) ) , ( ( 'missing file %s: Are you sure you have the correct database for bowtie2?' % PARAMS [ 'metaphlan_db' ] ) + '.1.bt2' ) #NEWLINE# method = '--bowtie2db' #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( PARAMS [ 'metaphlan_executable' ] == 'blast' ) : #NEWLINE# #INDENT# assert os . path . exists ( ( PARAMS [ 'metaphlan_db' ] + 'nin' ) ) , ( ( 'missing file %s: Are you sure you have the correct database for blast?' % PARAMS [ 'metaphlan_db' ] ) + 'nin' ) #NEWLINE# method = '--blastdb' #NEWLINE# #UNINDENT# #UNINDENT# statement = PipelineGenomeAssembly . Metaphlan ( ) . build ( method , method = 'read_map' ) #NEWLINE# P . run ( )