cmapBQ.utils package¶
Module contents¶
-
cmapBQ.utils.
csv_to_gctx
(filepaths, outpath, use_gctx=True)¶ Convert list of csv files to gctx. CSVs must have ‘rid’, ‘cid’ and ‘value’ columns No other columns or metadata is preserved.
- Parameters
filepaths – List of paths to CSVs
outpath – output directory of file
use_gctx – use GCTX HDF5 format. Default is True
- Returns
-
cmapBQ.utils.
long_to_gctx
(df)¶ Converts long csv table to GCToo Object. Dataframe must have ‘rid’, ‘cid’ and ‘value’ columns No other columns or metadata is preserved.
- Parameters
df – Long form pandas DataFrame
- Returns
GCToo object
-
cmapBQ.utils.
mk_out_dir
(path, toolname, create_subdir=True)¶
-
cmapBQ.utils.
parse_condition
(arg, sep=',')¶ Parse argument for pathname, string or list. If file path exists reads GRP or TXT file. Non-path filenames are tokenized by specified delimiter, default is ‘,’. Returns list
- Parameters
arg – Takes in pathname, string, or list.
sep – Delimiter to separate elements in string into list. Default is ‘,’
- Returns
list
-
cmapBQ.utils.
str2bool
(v)¶
-
cmapBQ.utils.
write_args
(args, out_path)¶
-
cmapBQ.utils.
write_status
(success, out, exception='')¶