error in reading codelink data
0
0
Entering edit mode
6 weeks ago

Hi Biostars members,

I am trying to analyze a Codelink dataset using the following code:

library(codelink)
 f = list.files(pattern = "txt")
 codset = readCodelinkSet(filename = f)

But I get this error:

     Error in readHeader(files[n], dec = TRUE) : Not a Codelink exported file.
 In addition: Warning messages: 
1: In .readCodelinkRaw(files = filename, ...) : 'readCodelink' and 'readCodelinkSet' do not convert intensities to NA based on flags anymore, except for spots flagged as 'M' (MSR spot). Instead, createWeights() is used to assign weights. 
These weights can be used during normalization and linear modeling. To obtain the old behavior use parameter 'old=TRUE' (weights will be created anyway).
 2: In grep("-{80}", scan(file, nlines = 30, flush = T, quiet = TRUE, : unable to translate 'CodeLink<99>' to a wide string 3: In grep("-{80}", scan(file, nlines = 30, flush = T, quiet = TRUE, : input string 1 is invalid

Can anyone help me to solve this error?

Nazanin

readcodelinkset • 502 views
ADD COMMENT
0
Entering edit mode

Hi, are the files exported with the same version of Codelink? It seems that one of your files might not have the expected header containing "CodeLink"-if I'm not mistaken-or there might be other issues with the columns.

I think you could try two things:

1) Depending on the number of files you have, check the first few lines of each file for example:

    files_txt <- list.files(pattern = "\\.txt$")
    for (file in files_txt) {
    cat("Reading file:", file, "\n")

   lines <- readLines(file, n = 30, warn = FALSE)
   print(lines)

   cat("\n-------------------\n")}

2) Try setting codset = readCodelinkSet(filename = f, old = TRUE), which may change something.

If you print an output of your files, I might be able to help you further.

ADD REPLY
0
Entering edit mode

Hey Marco,

Thanks for your comments.

I am not able to paste the output of my files here.

They are too long to be checked by Biostars.

Is it possible that I send my output via email?

By the way when I use codset = readCodelinkSet(filename = f, old = TRUE) I get the same error.

ADD REPLY
0
Entering edit mode

Sure, I have sent you an email to your institutional account.

ADD REPLY
0
Entering edit mode

Thanks.

I can be reached at hosseinkhan@ut.ac.ir.

ADD REPLY

Login before adding your answer.

Traffic: 3422 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