Convertors To Json

text_meta_to_json_meta

Convert text file meta to JSON Meta

usage: pmotools-python text_meta_to_json_meta [-h] --file FILE [--delim DELIM]
                                              [--index_col_name INDEX_COL_NAME]
                                              --output OUTPUT [--overwrite]

Named Arguments

--file

Input text file path

--delim

the delimiter of the input text file, examples tab,comma

Default: 'tab'

--index_col_name

by default output is a list, if an index column name is supplied it will be a dict with this column as index

--output

Output json file path

--overwrite

If output file exists, overwrite it

Default: False

excel_meta_to_json_meta

Convert Excel file meta to JSON Meta

usage: pmotools-python excel_meta_to_json_meta [-h] --file FILE
                                               [--sheet SHEET]
                                               [--index_col_name INDEX_COL_NAME]
                                               --output OUTPUT [--overwrite]

Named Arguments

--file

Input excel file path

--sheet

The sheet to convert, if none provided will default to first sheet

--index_col_name

by default output is a list, if an index column name is supplied it will be a dict with this column as index

--output

Output json file path

--overwrite

If output file exists, overwrite it

Default: False

microhaplotype_table_to_json_file

Convert microhaplotype table to a JSON file

usage: pmotools-python microhaplotype_table_to_json_file [-h] --file FILE
                                                         [--bioinfo_name BIOINFO_NAME]
                                                         [--library_sample_name_col LIBRARY_SAMPLE_NAME_COL]
                                                         [--target_name_col TARGET_NAME_COL]
                                                         [--seq_col SEQ_COL]
                                                         [--reads_col READS_COL]
                                                         [--additional_cols ADDITIONAL_COLS]
                                                         [--delim DELIM]
                                                         --output OUTPUT
                                                         [--overwrite]

Named Arguments

--file

Input excel file path

--bioinfo_name

Identifier of bioinformatics processing run

--library_sample_name_col

Column name containing library_sample_name

Default: 'library_sample_name'

--target_name_col

Column name containing target_name information

Default: 'target_name'

--seq_col

Column name containing microhaplotypes

Default: 'asv'

--reads_col

Column name containing reads per microhaplotype

Default: 'reads'

--additional_cols

Additional column name to add to detected haplotypes table, comma separated e.g. –additional_cols addCol,adddCol2

--delim

Delimiter of input file

Default: '    '

--output

Output json file path

--overwrite

If output file exists, overwrite it

Default: False

terra_amp_output_to_json

Convert Terra output to JSON sequence table

usage: pmotools-python terra_amp_output_to_json [-h] --file FILE
                                                [--gt_sheet GT_SHEET]
                                                [--asv_table_sheet ASV_TABLE_SHEET]
                                                [--asv_seqs_sheet ASV_SEQS_SHEET]
                                                --output OUTPUT [--overwrite]

Named Arguments

--file

Input excel file path

--gt_sheet

The gt sheet to convert, if none provided will default to gt

Default: 'gt'

--asv_table_sheet

The asv_table sheet to convert, if none provided will default to asv_table

Default: 'asv_table'

--asv_seqs_sheet

The asv_seqs sheet to convert, if none provided will default to asv_seqs

Default: 'asv_seqs'

--output

Output json file path

--overwrite

If output file exists, overwrite it

Default: False