'chromoMap error - subscript out of bounds
I am new to this community and hope my post is correct.
I tried to run a test case on chromoMap using the chromosome file (chrom) and annotation file (anno) below
> read.table(chrom)
  V1 V2   V3
1  7  1 1000
> read.table(anno)
   V1 V2 V3 V4
1 An1  7 10 30
2 An2  7 15 40
Unfortunately, I constantly ran into an error shown below. I tried to have a look into the code, but was not able to figure out the problem.
> chromoMap(chrom,anno)
********************************** __ __ ************
** __**|__ * __* __ * __ __ * __ *|  |  |* __ * __ **
**|__**|  |*|  *|__|*|  |  |*|__|*|  |  |*|_ |*|__|**
***********************************************|   **
*****************************************************
OUTPUT: 
Number of Chromosome sets: 1 
Number of Chromosomes in set  1 : 1 
Processing data.. 
Number of annotations in data set  1 : 2 
Error in temp.list[[inputData[[h]]$ch_name[i]]] : subscript out of bounds
Also the columns seemed to be recognized correctly.
> ncol(read.table(anno))
[1] 4
> ncol(read.table(chrom))
[1] 3  
I know its a trivial problem but I am happy for any suggestions.
Thanks!
Solution 1:[1]
When using R objects as input, you need to pass it within a list like:
chromoMap(list(chrom),list(anno))
It allows passing the objects for multiple ploidy within a list. For instance, for ploidy = 2 ,you can use:
chromoMap(list(chrom1,chrom2),list(anno1,anno2))
Thanks!
Solution 2:[2]
Try to change your chromosome name from 7 to VII.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source | 
|---|---|
| Solution 1 | Lakshay Anand | 
| Solution 2 | JEYOU | 
