Entering edit mode
6.6 years ago
sgujja
▴
40
Hi,
I am trying to use OrderedList to compare two gene list which have about ~10% overlapping genes.
However, I get an an error running:
> compareLists(list2, list3)
Error in compareLists(list2, list3) :
1 element(s) of first list not found in second
Could you please help.
Thanks Sharvari
Can you post a sample of your data? Are you sure the datatypes of these vectors are correct?
I seem to remember I had a similar situation some time ago. If I recall correctly it was due to some list members not being present in both lists (the basic premises of this to work is that the same IDs are present in both lists)
Hello Lieven,
The manual mentions about an optional parameter "mapping" when the two lists being compared are not the same.
However, using this option gives me an error mentioned below.
Thanks Sharvari
This is what I am trying to do:
Any feedback is appreciated.
Thanks
ADD COMMENT/ADD REPLY
when responding to existing posts to keep threads logically organized. You can edit your original post to add new information as well.code
option) to format parts of you post that contain code snippets. I've done it for you this time.Is that the same script that produced the error message as mentioned in your initial post? This seems to be a different one?
I updated the list names and used the optional argument 'mapping' as an input. Running the function 'compareLists' seems to be working now. I just want to make sure that the mapping input is correct.
From the outout it seems you still have issues with your mapping file as it says there are some missing (or did you only provided a subset for the mapping as testing purpose?)
you might get some other useful info from this biostar post
I did look at the other biostar post. All the entries are common in both the lists. However, in my example both the lists have only ~130 genes in common. Which is why I am using the mapping option. The mapping file has all the entries from lista and listb in the same order as in the respective lists.
OK, so you do not want to compare the complete lists but only the subset for which you provided the mapping? It might pay off to have a look at the additional options/parameters for the compareLists() function ...