-
Notifications
You must be signed in to change notification settings - Fork 31
mkdir code fails to use full path specified with -o option #109
Description
If a user specifies a full path for the output file prefix (e.g. /RNA_seq_1/lyc/project/lxm/scte/e14/e14), this is not used as the parent directory for the creation of the _scTEtmp/ directories. These directories are all created relative to the current working directory instead, with the e14 prefix
Line 106 in 566f6ab
| os.system('mkdir -p %s_scTEtmp/o1'%outname) |
The variable outname is created in this line, which keeps only the basename of the args.out parameter
Line 93 in 566f6ab
| outname = args.out.split('/')[-1:][0] |
This would not be an issue normally (assuming the user has write permission in the current directory), but creates a problem in a later call to Countexpression() which uses the full path args.out and not the shortened outname. This leads to a file not found error if the user started scTE from anywhere but the same directory as specified in the -o parameter
Line 155 in 566f6ab
| len_res, genenumber, filename = Countexpression(filename=args.out, allelement=allelement, genenumber=args.genenumber, cellnumber=args.cellnumber, hdf5=args.hdf5) |
This is the source of the error discussed in #70