Make read.marrayRaw upload data faster
0
0
Entering edit mode
Marcus Davy ▴ 680
@marcus-davy-374
Last seen 11.0 years ago
Hi, I have tweaked the read.marrayRaw code so the scan function accepts a "what" list of mode character for the 5 odd columns of interest, and NULL for the 77 odd unwanted columns in a gpr file The change is to the following code in read.marrayRaw: comment out; # h <- strsplit(readLines(f, n = skip + 1), split = sep) # h <- as.list(unlist(h[[length(h)]])) # names(h) <- gsub("\"", "", unlist(h)) replacing it with; h <- scan(f, quiet=TRUE, what=character(1), sep=sep, skip = skip, quote=quote, nlines=1) names(h) <- gsub("\"","",h) h <- lapply(h,as.null) cols <- cname.Gf, name.Gb, name.Rf, name.Rb, name.W) h[charmatch(cols,names(h))] <- character(1) #Ignores columns that are spelt incorrectly It should give the same errors as the previous code downstream if people incorrectly identify a column. Ive had about a 4x increase in multiple file uploading. Anyone out there want to test it for read.Spot, and read.SMD? Spot files dont have so many columns of data so the speed increase shouldnt be as much. marcus ______________________________________________________ The contents of this e-mail are privileged and/or confidential to the named recipient and are not to be used by any other person and/or organisation. If you have received this e-mail in error, please notify the sender and delete all material pertaining to this e-mail.
• 609 views
ADD COMMENT

Login before adding your answer.

Traffic: 722 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6