JiekaiLab / scTE

MIT License
87 stars 27 forks source link

args.out <---> filename #9

Closed melonheader closed 3 years ago

melonheader commented 3 years ago

Hello, I read your research paper on TE quantification in single-cell data. Very witty!

It prompted me to try out your pipeline, but it crushed with an error soooo close to an end. I looked the source code on git hub, and it seems I had found the source of an error.

At the line 155 where the Counterexpression function is called, for a filename argument it takes args.out, which is an output path specified by the user. Throughout the pipeline the outname ( basename of args.out ) is used, and all of the temporary files are saved to the working directory using the outname as a prefix for tmp folder.

Thus, when Counterexpression is called with args.out, it looks for temporary files following incorrect paths; from base.py:

def Countexpression(filename, allelement, genenumber, cellnumber, hdf5): gene_seen = allelement

whitelist={}
o = gzip.open('%s_scTEtmp/o4/%s.bed.gz'%(filename, filename), 'rt')

Temporarily changing args.out to outname in Counterexpression function call solved this problem for me and pipeline ran smoothly. All the output files were saved to the directory from where the original script had been run.

This error only occurs if args.out is provided as a path. However, the error is not noticeable until the very end of the pipeline. I would suggest to change args.out to outname in Counterexpression function call on the line 155 to prevent this unexpected behaviour

jphe commented 3 years ago

Thanks for your suggestion, we'll fix it in the next updatation.