Skip to content

File names in pre and post directories don't match. #9

Description

@LukaTandaric

Hi,

I am trying to implement the Windows-friendly version of CytofBatchAdjust to batch correct my data. Following the ReadMe and HowTo, I have managed to make the algorithm generate "corrected" files (in parentheses because i haven't imported the files into a gating software to check yet).

My non-anchor files are named "Batch[##]_xxx.fcs" and my anchor files are named "Batch[##]_Anchor_Pos_xxx.fcs".
I have my .fcs files, the BatchAdjust.R code, and ChannelsToAdjust.txt in a folder titled "FCS_Files", and the "BatchAdjust()" function is set up as follows:

BatchAdjust(
     basedir=".",
     outdir="TheSameParentDirectoryAsForTheBasedirFolder/FCS_Files_Corrected",
     channelsFile = "ChannelsToAdjust.txt",
     batchKeyword="Batch",
     anchorKeyword = "Anchor_Pos",
     method="95p",
     transformation=FALSE,
     addExt="_Corrected",
     plotDiagnostics=TRUE)

However, the final output in the console is: "[1] Testing total variance reduction:", after which the following error is shown:

Error in totalVar_allEvents(predir = basedir, postdir = outdir, batchKeyword = batchKeyword, : 
totalVar_allEvents: File names in pre and post directories don't match.

I have gone through the code step by step and cannot manage to discern the cause of the issue.

I have managed to bypass the error by setting both the basedir and outdir to "." and removing the following lines of code at the same time:

if (dir.exists(outdir))
     stop("outdir \'", outdir, "\' already exists. It cannot be overwritten.")

...but then I get marker intensity distribution histograms that repeat over each other twice.

Luka

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions