|
2 | 2 |
|
3 | 3 | import argparse, csv, re, os |
4 | 4 | import sys |
| 5 | +from pathlib import Path |
| 6 | + |
| 7 | +sys.path.insert(0, str(Path().absolute())) |
| 8 | +# Check if config.py and program.py exist in current working directory |
| 9 | +config_path = os.path.join(os.getcwd(), 'config.py') |
| 10 | +program_path = os.path.join(os.getcwd(), 'program.py') |
| 11 | + |
| 12 | +if not os.path.exists(config_path): |
| 13 | + print("Error: config.py not found in current directory", file=sys.stderr) |
| 14 | + sys.exit(1) |
| 15 | + |
| 16 | +if not os.path.exists(program_path): |
| 17 | + print("Error: program.py not found in current directory", file=sys.stderr) |
| 18 | + sys.exit(1) |
| 19 | + |
| 20 | +import config |
| 21 | +import program |
5 | 22 |
|
6 | 23 | def main(raw_args=None): |
7 | 24 | parser = argparse.ArgumentParser(description="""Help to set up and run the single cell multi pipeline""") |
@@ -78,7 +95,10 @@ def main(raw_args=None): |
78 | 95 | spamwriter = csv.writer(csvfile, delimiter=',') |
79 | 96 | spamwriter.writerow(['[gene-expression]']) |
80 | 97 | spamwriter.writerow(['reference', args.ref]) |
81 | | - ## Parameter for fixed RNA profiling |
| 98 | + if "hg38" in config.ref or "mm10" in args.ref or "mm39" in args.ref: |
| 99 | + spamwriter.writerow(['cell-annotation-model', 'auto']) |
| 100 | + spamwriter.writerow(['tenx-cloud-token-path', program.tenx_cloud_token_path]) |
| 101 | + ## Parameter for fixed RNA profiling |
82 | 102 | if args.probe_set != None: |
83 | 103 | spamwriter.writerow(['probe-set', args.probe_set]) |
84 | 104 | if args.force: |
|
0 commit comments