WubingZhang / MAGeCKFlute

Integrative analysis pipeline for pooled CRISPR functional genetic screens
https://github.com/WubingZhang/MAGeCKFlute
24 stars 10 forks source link

Incorrect File Path Concatenation in FluteMLE Function's QC/Selection step #25

Open sgt1796 opened 1 month ago

sgt1796 commented 1 month ago

The FluteMLE function will not put the QC and Selection files correctly under their corresponding folder. Those files was put in the output dir while QC/ and Selection/ are left empty.

How it happens

The FluteMLE function use file.path to ensure the correctness of the directory, but do so will remove the "/" after file path strings:

# FluteMLE.R

# outputDir1: "./QC"
outputDir1 = file.path(outdir, "QC/") 
...
# desired filename:   "./QC/ViolinView_all_cell_cycle.png"
# filename :          "./QCViolinView_all_cell_cycle.png"
P1 = ViolinView(..., filename = paste0(outputDir1, "ViolinView_all_", norm_method, ".png")) 

permalink to the code: https://github.com/WubingZhang/MAGeCKFlute/blob/4afc2da6b622f3dbaaa93dc70fae367a7b2f524b/R/FluteMLE.R#L137C2-L143C90

The same happens for Selection folder.

I wonder this is unique to my machine or system, or a common behavior?