chromoMap Error: .rowNamesDF<-`(x, value = value) : invalid 'row.names' length
1
0
Entering edit mode
3.1 years ago
kamanovae ▴ 100

Hi!

I am trying to run the program chromoMap. But I am getting the error:

Error in `.rowNamesDF<-`(x, value = value) : invalid 'row.names' length

My program start looks like this:

library(chromoMap)


chr_file_1 =read.table("~/chr_file.txt",sep = "\t", quote="", stringsAsFactors=FALSE)
print(chr_file_1)
annot_file_1= read.table("~/annotation_pos.txt",sep = "\t",quote="", stringsAsFactors=FALSE)
print(annot_file_1)

chromoMap( "chr_file.txt", "annotation_pos.txt")

All input files were generated based on the instruction

chr_file.txt:

    V1       V2       V3  
1 chr1    332315086     32400268

annot_file_1:

          V1    V2       V3       V4         V5

1    rs144848 chr13 32906729 32906729  c.1114A>C

2    rs169547 chr13 32929387 32929387  c.7397T>C

3  rs11571833 chr13 32972626 32972626  c.9976A>T

If I run the function differently, then I get a new error

chromoMap(chr_file_1, annot_file_1)

Error: The number of data files(s) must same as the number of chromsome file(s) Error in chromoMap(chr_file_1, annot_file_1) :

chromoMap R • 2.8k views
ADD COMMENT
0
Entering edit mode

Heys! Did you solve it? I also had a lot of issues because of formatting. Could be that the annot_file_1 is not separated by tabs? Just in case I leave here these two files that work for me:

as chr_file_1:

chr1    1   1000
chr2    1   700

and as annotation_pos:

An1 chr1    558 560
An2 chr2    396 398

I hope it helps!

ADD REPLY
0
Entering edit mode

In "chr_file.txt" you have chr1 listed, no chr13. In "annot_file_1.txt" you have chr13 listed, no chr1.

I wonder if this may have something to do with the error?

I am having the same issue, but with loading data.frames not files, and seeing this makes me wonder if the extraneous chromosome information I have in my chr_file.txt may be the issue.

ADD REPLY
0
Entering edit mode
15 months ago
Alice • 0

Hi ! I don't know if you managed at the end, and hope it can help someone else : by using lists, it gave me the map, while I get the same error as you if I don't:

chromoMap(list(chr_file_1),list(annot_file_1))

ChromoMap using lists inside the chromoMap command

chromoMap(chr_file_1, annot_file_1)

Error: The number of data files(s) must same as the number of chromsome file(s)
Error in chromoMap(chromSize, test) : 

Here are how look my two dataframes (might be a matter of class): chr_file_1

   V1  V2  V3
1  1  1 6088797
2  2  1 3860111
...

annot_file_1

              V1   V2   V3   V4
1 ZtIPO323_1_GATC_1  1  572  576
2 ZtIPO323_1_GATC_2  1  758  762
...
ADD COMMENT

Login before adding your answer.

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