moca.pipeline package

Submodules

moca.pipeline.job_processor module

Job Processor Module

class moca.pipeline.job_processor.Pipeline(config_file=None)[source]

Bases: moca.helpers.configuration_parser.ConfigurationParser

Generic class to run pipelines

Parameters:config_file (string) – Optional file input to load all configurations
can_run_meme_parallel(cmd)[source]
get_fimo_default_params
get_meme_default_params
get_memechip_default_params
run_centrimo(fasta_in, meme_file, out_dir)[source]

Run centrimo

Parameters:
  • fasta_in (string) – Path to input fasta
  • meme_file (string) – Path to MEME’s motif file
  • out_dir (string) – Output directory
Returns:

output – A dictionary with ‘stderr,stdout,cmd,exitcode,out_dir’

Return type:

dict

run_fasta_shuffler(fasta_in, fasta_out)[source]

Run fasta-dinucleotide-shuffle to generate random fasta

run_fimo(motif_file, motif_num, sequence_file, out_dir=None, strargs=None)[source]

Run fimo to find out locations where motif occurs

Parameters:
  • motif_file (str) – Path to meme.txt
  • motif_num (int) – Motif number to investigate
  • sequence_file (str) – Path to sequence file
  • out_dir (str) – Location to output fimo results
  • strargs (str) – string arguments as would be passed to fimo commandline
run_meme(fasta_in, out_dir=None, strargs=None)[source]

Run meme Run meme on a given input fasta

Parameters:
  • strargs (string) – A concatenated string containing parameters as would be passed to standalone meme Defualt parametes used: ‘-dna -revcomp -maxsize 1000000 -nmotifs 5 -p 4’ To modify: Pipeline.meme_default_params
  • fasta_in (string) – Location of the fasta file
  • out_dir (string) – Location to write all meme analysis output
Returns:

meme_out – Location of meme output

Return type:

string

run_memechip(fasta_in, out_dir=None, strargs=None)[source]

Run meme-chip Run meme-chip on a given input fasta

Parameters:
  • strargs (string) – A concatenated string containing parameters as would be passed to standalone meme Defualt parametes used: ‘-dna -revcomp -maxsize 1000000 -nmotifs 5 -p 4’ To modify: Pipeline.meme_default_params
  • fasta_in (string) – Location of the fasta file
  • out_dir (string) – Location to write all meme analysis output
Returns:

output – A dictionary with ‘stderr,stdout,cmd,exitcode,out_dir’

Return type:

dict

static save_conservation_scores(intervals, wig_file, out_directory, out_prefix='phylop')[source]

Extract and save conservation scores :param intervals: list of tuple :type intervals: list :param wig_file: Wig file location :type wig_file: string :param out_directory: Out file directory :type out_directory: string :param out_prefix: Out file prefix :type out_prefix: string

Module contents

Pipeline runner