Permutation analysis error [Graph Level]

10 views
Skip to first unread message

özgün özalay

unread,
Nov 28, 2016, 1:43:16 PM11/28/16
to brainGraph-help
Hi Chris;

We did some analysis on our data before but recently maybe after some update it seems that we can not reproduce same pipeline again. We are having a problem on step 5.2.1 in your user guide. When we try the same code we get following error; 

 permPlot <- plot_perm_diffs(g[[1]], g[[2]], perms.all, 'Lp', level='graph', + groups=groups, alternative='less', + ylabel='Average path length')



Error in `[.data.table`(perm.dt, , list(ci.low = unique(ci.low)), by = density) : 
  Column 1 of j's result for the first group is NULL. We rely on the column types of the first result to decide the type expected for the remaining groups (and require consistency). NULL columns are acceptable for later groups (and those are replaced with NA of appropriate type and recycled) but not for the first. Please use a typed empty vector instead, such as integer() or numeric().


Do you have any idea?

Best wishes
Ozgun

Chris Watson

unread,
Nov 28, 2016, 2:47:30 PM11/28/16
to brainGr...@googlegroups.com
First thought: get rid of the "plus" signs that are in the code. However, if that is simply an artifact of the code that you copy-pasted into the email, it wouldn't cause the error.
It is more likely that the error is with "perms.all". If you send me the data I can take a look. Before that, be sure that "perms.all" has a column with name "Lp", and that all of your graphs in the "g" object have a graph-level attribute that is also called "Lp".

Chris

--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/e3c1293c-114b-4a93-917e-c36cca6d645a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ozgun Ozalay

unread,
Nov 28, 2016, 3:08:27 PM11/28/16
to brainGr...@googlegroups.com

I think it is not about "+" signs, also i've checked "perms.all" and "g" objects both have the "Lp" column. So i am attaching the link for zipped folder. I hope you can figure it out. Btw we tried to run this both on Windows and Ubuntu workstations before and after the upgrade but nothing changed...


https://drive.google.com/open?id=0B13GkoA7aIJheXJNU2pkMktHbW8


Best

Ozgun

You received this message because you are subscribed to a topic in the Google Groups "brainGraph-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/brainGraph-help/U1-AKVRCgNg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to brainGraph-he...@googlegroups.com.
To post to this group, send email to brainGr...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/brainGraph-help/CAHVz74iLdgmPn4Xma4ZkiMJ-Se_6m5kHbGaF80o%3DUba6R8EaHw%40mail.gmail.com.

Chris Watson

unread,
Dec 11, 2016, 10:49:26 PM12/11/16
to brainGr...@googlegroups.com
Hi Ozgun, sorry for the delay (I had a grant application due recently). I am currently looking into this. I see the error you posted but only when alt='less'; it does not appear when alt='two.sided' or alt='greater'. Hopefully I will have a solution soon.

Chris

To unsubscribe from this group and all its topics, send an email to brainGraph-help+unsubscribe@googlegroups.com.

To post to this group, send email to brainGraph-help@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-help+unsubscribe@googlegroups.com.
To post to this group, send email to brainGraph-help@googlegroups.com.

Chris Watson

unread,
Dec 16, 2016, 2:11:20 AM12/16/16
to brainGr...@googlegroups.com
Hi Ozgun, please change line 76 of the function "plot_perm_diffs" to:
perm.dt[, c('ci.low', 'ci.high') := as.list(sort(perm.diff)[ceiling(.N * ci)]), by=density]

The change is in the addition of the "ceiling" function.

This should work for you until I update the package. The error arose in part because you had too few permutations and an integer was not returned from the above code. "ceiling" will round up to the nearest integer. Let me know if you still get an error.

Chris

özgün özalay

unread,
Dec 29, 2016, 9:18:22 AM12/29/16
to brainGraph-help
Hi Chris;

Finally we had a chance to try your suggestion after a long break. As you said it works completely well now!
Thank you so much!

Best wishes
Ozgun
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-he...@googlegroups.com.
To post to this group, send email to brainGr...@googlegroups.com.

--
You received this message because you are subscribed to a topic in the Google Groups "brainGraph-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/brainGraph-help/U1-AKVRCgNg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to brainGraph-he...@googlegroups.com.
To post to this group, send email to brainGr...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "brainGraph-help" group.
To unsubscribe from this group and stop receiving emails from it, send an email to brainGraph-he...@googlegroups.com.
To post to this group, send email to brainGr...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages