Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkdir code fails to use full path specified with -o option #109

Open
buddej opened this issue Jan 24, 2025 · 0 comments
Open

mkdir code fails to use full path specified with -o option #109

buddej opened this issue Jan 24, 2025 · 0 comments

Comments

@buddej
Copy link

buddej commented Jan 24, 2025

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

scTE/bin/scTE

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

scTE/bin/scTE

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

scTE/bin/scTE

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant