Mercurial > repos > lecorguille > xcms_export_samplemetadata
comparison lib.r @ 3:10f7b1548200 draft
planemo upload for repository https://github.com/workflow4metabolomics/xcms commit 37b0a6a7686f701e4bf00db97ae2c1b82cd6e989
author | lecorguille |
---|---|
date | Fri, 09 Nov 2018 15:20:18 -0500 |
parents | e3c06320f884 |
children | 8c62030a1136 |
comparison
equal
deleted
inserted
replaced
2:942ffa3c38b8 | 3:10f7b1548200 |
---|---|
195 variableMetadata = data.frame(name=groupnamesW4M(xdata), variableMetadata) | 195 variableMetadata = data.frame(name=groupnamesW4M(xdata), variableMetadata) |
196 | 196 |
197 variableMetadata <- RTSecondToMinute(variableMetadata, convertRTMinute) | 197 variableMetadata <- RTSecondToMinute(variableMetadata, convertRTMinute) |
198 variableMetadata <- formatIonIdentifiers(variableMetadata, numDigitsRT=numDigitsRT, numDigitsMZ=numDigitsMZ) | 198 variableMetadata <- formatIonIdentifiers(variableMetadata, numDigitsRT=numDigitsRT, numDigitsMZ=numDigitsMZ) |
199 dataMatrix <- naTOzeroDataMatrix(dataMatrix, naTOzero) | 199 dataMatrix <- naTOzeroDataMatrix(dataMatrix, naTOzero) |
200 | |
201 # FIX: issue when the vector at peakidx is too long and is written in a new line during the export | |
202 variableMetadata[,"peakidx"] <- vapply(variableMetadata[,"peakidx"], FUN = paste, FUN.VALUE = character(1), collapse = ",") | |
200 | 203 |
201 write.table(variableMetadata, file=variableMetadataOutput,sep="\t",quote=F,row.names=F) | 204 write.table(variableMetadata, file=variableMetadataOutput,sep="\t",quote=F,row.names=F) |
202 write.table(dataMatrix, file=dataMatrixOutput,sep="\t",quote=F,row.names=F) | 205 write.table(dataMatrix, file=dataMatrixOutput,sep="\t",quote=F,row.names=F) |
203 | 206 |
204 } | 207 } |