Module Expr Str Import alias Import alias Import alias ImportFrom alias ImportFrom alias FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Call AttributeLoad NameLoad attr Str NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Str orelse If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad NameLoad attr Num Assign NameStore Str orelse Print BinOpMod Str NameLoad Expr Call AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Str NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Str NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Str NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Str NameLoad Assign SubscriptStore SubscriptLoad NameLoad Index Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Index Str NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad Expr Call NameLoad NameLoad NameLoad Return NameLoad decorator_list
N/A N/A 
Functions to parse directories of input fastq files, create symlinks with expected filename structures, and return metadata.

Clare Sloggett, VLSCI
 N/A sys N/A re N/A os.path collections defaultdict rubra.utils mkLink parse_and_link N/A N/A file symlink_dir metadata_dict N/A N/A N/A 
    Parse metadata out of input filename and construct symlink.
    Takes a fastq filename, destination directory, and a metadata dict, which should be of type defaultdict(dict).
    Parse the filename to get information on the sample name, run, read #, etc.
    Medadata is added to the provided metadata_dict.
    Some metadata is used to build symlinks, to guarantee filename uniqueness and a regular naming structure.    Currently parsing by assuming AGRF naming structure and paired-end reads
    Currently will ONLY handle gzipped files, to avoid multiple links to the same data.
     N/A match_old N/A N/A re match .*?/([^_/]+)_([a-zA-Z0-9-.]+)_s_([0-9]+)_(1|2)_sequence.txt.gz file N/A match_new N/A N/A re match .*?/([a-zA-Z0-9-.]+)_([^_/]+)_[CAGTN]+_L([0-9]+)_R(1|2).fastq.gz file N/A match_old N/A N/A run_id N/A N/A match_old group 1 N/A sample N/A N/A match_old group 2 N/A lane N/A int N/A N/A match_old group 3 N/A pair N/A N/A match_old group 4 N/A encoding I N/A N/A match_new N/A N/A run_id N/A N/A match_new group 2 N/A sample N/A N/A match_new group 1 N/A lane N/A int N/A N/A match_new group 3 N/A pair N/A N/A match_new group 4 N/A encoding S N/A N/A N/A Unable to parse name of fastq file %s . file N/A N/A N/A sys exit 1 N/A newfile N/A N/A N/A os path join symlink_dir N/A %s_%s_L%d_%s.fastq.gz N/A sample run_id lane pair N/A N/A N/A metadata_dict N/A N/A N/A N/A os path basename newfile N/A sample sample N/A N/A N/A metadata_dict N/A N/A N/A N/A os path basename newfile N/A run_id run_id N/A N/A N/A metadata_dict N/A N/A N/A N/A os path basename newfile N/A lane lane N/A N/A N/A metadata_dict N/A N/A N/A N/A os path basename newfile N/A pair pair N/A N/A N/A metadata_dict N/A N/A N/A N/A os path basename newfile N/A encoding encoding N/A relative_sourcefile N/A N/A N/A os path relpath file symlink_dir N/A N/A mkLink relative_sourcefile newfile N/A newfile N/A