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

REPRODUCIBILITY: Created CEL files carry creation timestamp in header => non-unique CEL files #8

Open
HenrikBengtsson opened this issue Nov 20, 2015 · 2 comments

Comments

@HenrikBengtsson
Copy link
Owner

HenrikBengtsson commented Nov 20, 2015

It looks like convertToUnique() for AffymetrixCelSet writes CEL files that have a creation timestamp in the header. Instead of creating a timestamp for when the file was created, it's / it may be better to have it inherit the timestamp from the source CEL file.

@HenrikBengtsson
Copy link
Owner Author

This originates from affxparser::cdfHeaderToCelHeader();

> affxparser::cdfHeaderToCelHeader
> affxparser::cdfHeaderToCelHeader
function (cdfHeader, sampleName = "noname", date = Sys.time(),
    ..., version = "4")
{
    version <- match.arg(version)
    celHeader <- list()
    celHeader$version <- version
    celHeader$cols <- cdfHeader$cols
    celHeader$rows <- cdfHeader$rows
    celHeader$total <- celHeader$rows * celHeader$cols
    celHeader$chiptype <- cdfHeader$chiptype
    celHeader$algorithm <- "NoAlgorithm"
    pd <- packageDescription("affxparser")
    creator <- sprintf("Creator:%s;Version:%s;", pd$Package,
        pd$Version)
    celHeader$parameters <- paste(creator, sep = "")
    cols <- celHeader$cols
    rows <- celHeader$rows
    datHeader <- list(pixelRange = "[0..65535]", sampleName = sampleName,
        CLS = cols, RWS = rows, XIN = 0, YIN = 0, VE = 0, scanTemp = "",
        laserPower = "", scanDate = format(date, "%m/%d/%y %H:%M:%S"),
        scanner = list(id = "", type = ""), chipType = celHeader$chiptype)
    datHeader <- .wrapDatHeader(datHeader)
    header <- sprintf("Cols=%d\nRows=%d\nTotalX=%d\nTotalY=%d\nOffsetX=0\n
OffsetY=0\nGridCornerUL=0 0\nGridCornerUR=%d 0\nGridCornerLR=%d %d\n
GridCornerLL=0 %d\nAxis-invertX=0\nAxisInvertY=0\nswapXY=0\nDatHeader=%s\n
Algorithm=%s\nAlgorithmParameters=%s\n",
        cols, rows, cols, rows, cols, cols, rows, rows, datHeader,
        celHeader$algorithm, celHeader$parameters)
    celHeader$header <- header
    celHeader$cellmargin <- 2
    celHeader$noutliers <- 1
    celHeader$nmasked <- 1
    celHeader
}
<environment: namespace:affxparser>

@HenrikBengtsson HenrikBengtsson changed the title REPRODUCIBILITY: convertToUnique() writes CEL files with timestamps in header REPRODUCIBILITY: Created CEL files carry creation timestamp in header => non-unique CEL files Nov 20, 2015
@HenrikBengtsson
Copy link
Owner Author

UPDATE: There are several other methods in aroma.affymetrix that uses cdfHeaderToCelHeader(); should they also be "fixed".

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

No branches or pull requests

1 participant