immunarch
immunarch copied to clipboard
Error in repload when loading metadata file
I noticed a problem with the repload function when loading a metadata file. Everything works fine as long as just the "Sample" column in the metadata.txt file ist provided, such as
metaFiles <- as_tibble(data.frame(Sample= c("D15-2P10_TR_germ-pass", "D15-2P3_TR_germ-pass", "D15-2P7_TR_germ-pass",
"D15-2P8_TR_germ-pass", "D15-3P10_TR_germ-pass", "D15-P7_TR_germ-pass",
"D15-P8_TR_germ-pass"), stringsAsFactors = FALSE))
write.table(metaFiles, file=paste0(PathtoData, "Sequence Tables\", paste("metadata.txt")), row.names=FALSE, col.names=TRUE, sep=" ")
But as soon as I try to pass more than one column:
metaFiles <- as_tibble(data.frame(Sample= c("D15-2P10_TR_germ-pass", "D15-2P3_TR_germ-pass", "D15-2P7_TR_germ-pass",
"D15-2P8_TR_germ-pass", "D15-3P10_TR_germ-pass", "D15-P7_TR_germ-pass",
"D15-P8_TR_germ-pass"), Peptide= c("P10", "P3","P7", "P8", "P10","P7","P8"), Timepoint= c(2,2,2,2,3,1,1), stringsAsFactors = FALSE))
the repload function stops and throws following error:
Error in .process_batch(batches[[batch_i]], .format, .mode, .coding) :
No "Sample" column found in the metadata file. The "Sample" column with the names of samples without extensions (e.g., ".txt", ".tsv") is required. Please provide it and run the parsing again.
I am running R version 4.1.0 with immunarch version 0.6.7.
I would appreciate your help! Thank you
Hello @nkric,
Thank you for contacting us!
I am sorry you had to deal with this inconvenience. Fixing it in the near future has been our priority.
I will get back to you with any updates.
Thank you so much for drawing our attention to this. Please contact us with any questions further along.
Best regards, Maria Samokhina
Hello @nkric, I solved the problem by setting the sep argument to a tabulation likeso: write.table(metaFiles, file=paste0(PathtoData, "Sequence Tables", paste("metadata.txt")), row.names=FALSE, col.names=TRUE, sep="\t"). Hope this helps !
Hey @vanessajmh, Indeed that solved the issue! Thank you!