Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
'''
settings, args = utils.get_args()
try:
utils.make_output_dir(args.outdir)
utils.init_logs(args)
args.format = utils.check_valid_format(args.format)
sources = {
"fastq": args.fastq,
"bam": args.bam,
"cram": args.cram,
"summary": args.summary,
"fasta": args.fasta,
"ubam": args.ubam,
}
if args.split_runs:
split_dict = utils.validate_split_runs_file(args.split_runs)
if args.pickle:
from nanoget import combine_dfs
datadf = combine_dfs(dfs=[pickle.load(open(p, 'rb')) for p in args.pickle],
names=args.names,
method="track")
elif args.feather:
from nanoget import combine_dfs
from pandas import read_feather
datadf = combine_dfs([read_feather(p) for p in args.feather],
names=args.names,
method="track")
else:
datadf = nanoget.get_input(
source=[n for n, s in sources.items() if s][0],
files=[f for f in sources.values() if f][0],
threads=args.threads,