#isee

2017-12-08

Kevin Rue-Albrecht (04:12:45): > @Kevin Rue-Albrecht has joined the channel

Kevin Rue-Albrecht (04:12:46): > set the channel description: Interactive SummarizedExperiment Explorer

Federico Marini (04:12:46): > @Federico Marini has joined the channel

Aaron Lun (04:12:46): > @Aaron Lun has joined the channel

Charlotte Soneson (04:21:22): > @Charlotte Soneson has joined the channel

Aaron Lun (04:58:38): > I’m in.

Kevin Rue-Albrecht (05:03:30): > Cool. I’ll be really busy today (2-day week to get things done over here ^^) > but I also meant to ask: do we have a preferred ‘demo/toy’ data set for the app?

Kevin Rue-Albrecht (05:04:17): > (might wanna create a thread on the above message, to keep the channel as ‘clean and lean’ as possible)

Aaron Lun (05:07:13) (in thread): > Try thescRNAseqdataset, in thescRNAseqpackage? > > library(scRNAseq) > data(allen) > sce <- as(allen, "SingleCellExperiment") >

Kevin Rue-Albrecht (05:28:36): > @Federico Marini: happy to let you handle the backbone-stripping part then. I haven’t started yet, and you’ll be much faster going through your own dashboard:slightly_smiling_face:If I can make a suggestion though, I’d propose the first-commit backbone to basically have a single input (the object), and a single output (summary of the object, such as a show method, maybe cleaned up a little). > Basically, just so that everyone can get familiar with the minimal app structure before it grows too much.

Federico Marini (05:37:36): > I’m in too. Thanks for setting the whole thing up

Federico Marini (05:40:10) (in thread): > @Kevin Rue-AlbrechtYes, I’ll make a basic backbone. Not that much of a reason to make it too complex as a starter. > And yes, I’ll go with a single input i.e. our sce object. Happy to stick to the allen dataset!

Kevin Rue-Albrecht (20:56:48): > @Kevin Rue-Albrechtshared a file:First scaffold in branchkevin_1 - File (Canvas): First scaffold in branch kevin_1

Unknown User (20:56:49): > @Kevin Rue-Albrecht commented on @Kevin Rue-Albrecht’s file https://community-bioc.slack.com/docs/T35G93A5T/F04C1HKH5GD: update - File (Canvas): First scaffold in branch kevin_1

2017-12-09

Kevin Rue-Albrecht (04:38:49): > Hi<!channel>, as a summary of the note above, please feel free to toy with the MWE (minimal working example) in branchkevin_1if you want to warm up you Shiny skills.@Federico Marini, feel free to ignore this stub, if you’d like to take a fresh start having learned from your experience withideal. > I’ll be out most of the day today, and I’m just as happy to come back to a new branch that an extension of this one.

Aaron Lun (11:09:43): > Most of these warnings can be eliminated by usingimportFromin theNAMESPACEto avoid clashes.

Aaron Lun (11:10:03): > Just installed it. It runs, and that’s about it.

Kevin Rue-Albrecht (13:35:27): > Good to know it runs on your system Aaron. > Yeah - I really did mean MWE. Basically it just stores the object in the reactive list and confirms it in the value box. In this way any of us can branch off this commit and prototype a single plot without any superfluous overhead. > > Regarding the imports, 1) I’m aware of the trick, I just haven’t spent the time to pick the individual imports. 2) i notice that roxygen causes packages imported in alphabetical order no matter the order I list them in, which can cause unexpected overrides. Things to bear in mind

2017-12-10

Charlotte Soneson (08:49:50): > It runs also on my machine. I have added .travis.yml files to both the kevin_1 and master branches (the kevin_1 branch passes:+1:) so all future changes should be automatically tested

Kevin Rue-Albrecht (09:55:40): > awesome, thanks!

Kevin Rue-Albrecht (10:01:16): > Federico is a better man than I am: he’s taking a safer start sketching on paper first. Just thought I’d offer a template in the meantime

2017-12-11

Federico Marini (04:36:18): > As Kevin said, I preferred starting sketching on paper. This is also due to purely logistic reasons, i.e. the impossibility to code with 3 kids around in the weekend.

Federico Marini (04:37:12): > I’ll put together all the suggestions/MWE-components in what might be the main branch

Federico Marini (04:37:49): > … and with the first things first, I’ll brutally port thescater_guifunctionality over

Federico Marini (04:38:54): > @Charlotte Soneson, is the .travis config already on? I think only you can switch it on for the first time

Kevin Rue-Albrecht (04:39:15): > it’s on, you can find the report on travis, let me find the link again

Federico Marini (04:40:29): > Cool - i found it

Federico Marini (04:40:30): > https://travis-ci.org/csoneson/SEE

Kevin Rue-Albrecht (04:40:39): > also, you don’t have to port all thescater_guifeature by yourself, once the scaffold (I mean just a blank page with maybe a couple of tabs) is available to all, we should be able to each nest in a separate corner of the app and contribute there

Federico Marini (04:41:01): > I’ll add a badge to the README.md

Kevin Rue-Albrecht (04:41:42): > btw, given that the.travis.ymlfile was added as separate commits to themasterandkevin_1branch, we should be careful is we ever want to merge them (conflict!)

Kevin Rue-Albrecht (04:43:02): > one way around that I believe is agit reverton the commit tokevin_1, followed by agit rebase. This way the.travis.ymlwould be added only once through the commit tomaster

Federico Marini (04:44:28): > ok I’ll keep it in mind. > For the nasty warnings of importing too much, I am a big fan ofcodetoolsBioc

Federico Marini (04:44:55): > -> makes a very nice set of suggestions to keep the import/importFrom fields pretty compact

Kevin Rue-Albrecht (04:47:41): > ok, i did spend a tiny bit of time last night trying to identify whichimportcould be turned intoimportFrom, but if there’s a tool for that, all the better

Federico Marini (04:49:20): > been there, done that:smile:codetoolsBioccan handle it quite neatly

Federico Marini (04:50:09): > it is mostly suggestions, so sometimes can be also wrong-y. but most of the times, it really just picks the correct funcs

Kevin Rue-Albrecht (04:51:06): > ‘Note that codetoolsBioC doesn’t belong to the current release or devel version of Bioconductor anymore.’http://bioconductor.riken.jp/packages/stats/bioc/codetoolsBioC/

Federico Marini (04:53:20): > Yeah, it kind of “never was”. But the sources for that are available on the old svn

Kevin Rue-Albrecht (04:54:36): > ok you mean this link then?http://grokbase.com/t/r/bioc-devel/157rt0kdj4/make-codetoolsbioc-available-on-github“Currently, the codetoolsBioC package is available via:https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/codetoolsBioC” > - Henrik Bengtsson
> Jul 24, 2015 at 4:12 pm - Attachment (grokbase.com): [Bioc-devel] Make codetoolsBioC available on GitHub? - Grokbase > (2 replies) Currently, the codetoolsBioC package is available via: https://hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/codetoolsBioC Can codetoolsBioC be mirrored on GitHub like the other BioC packages, or is that only possible for built and distributed BioC package? Thanks, Henrik

Federico Marini (04:55:53): > exactly. svn to get it, build it, install it, and that’s it. no fancyness/commodity of biocLite…but still working

Kevin Rue-Albrecht (04:56:05): > ok great, thanks

Kevin Rue-Albrecht (04:58:58): > Separate point: > thanks to my PI (Steve Sansom) I discovered the ‘protected branch’ feature of GitHub:https://help.github.com/articles/defining-the-mergeability-of-pull-requests/@Charlotte Soneson: Shall we set that up on themasterbranch to have a safety net? and also encourage developing on secondary branches? > Even as a lone developer on several projects, I’ve messed up mymasterbranch more than once - Attachment (help.github.com): Defining the mergeability of pull requests - User Documentation > You can require pull requests to pass a set of checks before they can be merged. For example, you can block pull requests that don’t pass status checks. You can also require that pull requests have at least one approved review before they can be merged. …

Aaron Lun (10:10:13): > Wow, I see everyone’s been busy. Here’s an example of something one of my colleagues created:http://marionilab.cruk.cam.ac.uk/organogenesis/

Aaron Lun (10:11:16): > And another one:

Aaron Lun (10:11:17): > http://marionilab.cruk.cam.ac.uk/mammaryGland/

Kevin Rue-Albrecht (10:32:13): > Cool, thanks for sharing, nice ideas in both cases

Kevin Rue-Albrecht (10:44:34): > I wish I had a link to share, but I couldn’t even find a (public) GitHub repo: last week someone in Oxford presented an R ‘SC analysis toolkit’ with a minimalistic Shiny app that does a job similar toideal, in the meaning that he’s trying to offer an interactive interface to take a user through a workflow, (rather than visualise precomputed result, which I think is a more efficient strategy).

Kevin Rue-Albrecht (10:56:16): > (nothing new btw, just a wrapper around scran/scater/Seurat functions for people who like GUIs)

Federico Marini (11:06:24): > @Aaron LunI can’t really try out the two apps you linked - the apps start and then crash (?) right after that

Kevin Rue-Albrecht (11:09:03): > that’s weird. I just clicked both links again, and they both work for me

Federico Marini (11:11:13): > thoroughly tested i.e. clicked and reclicked on safari, firefox and chrome:stuck_out_tongue:

Kevin Rue-Albrecht (11:12:21): > I can only vouch for Safari:sweat_smile:

Aaron Lun (11:14:42): > I can vouch for Firfefox

Aaron Lun (11:14:58): > Maybe it’s brexit

Federico Marini (11:15:20): > mos def:smile:

Federico Marini (11:33:33): > <!channel>: So, I just uploaded the first complete backbone thingy. > Few things: > - i already added a few of the things we will anyway need for the bioc submission > - I kept it as simple as it was wished to give everyone a first toy to play around with > - the author list is merely sorted on alphabetical order as of now, I did not want to throw coins now:smile:- some parts in the code are relatively heavily commented, so that everyone can have best readability of what happens/should happen

Federico Marini (11:34:38): > I’ll try to check aaron’s apps as soon as I get a VPN into some uk ip addresses:sweat_smile:

Federico Marini (11:35:33): > I don’t know whether/when we should change the repo name, after converging on theiSEE, but this is minor, I’d say

Kevin Rue-Albrecht (11:36:59): > true, although i’d say as long as theDESCRIPTIONand other files have the right name, the repo name can be anything for the time being

Kevin Rue-Albrecht (11:42:59): > can I just ask again for some opinions about makingmastera ‘protected-branch’ ? - Attachment: Attachment > Separate point: > thanks to my PI (Steve Sansom) I discovered the ‘protected branch’ feature of GitHub: > https://help.github.com/articles/defining-the-mergeability-of-pull-requests/ > @Charlotte Soneson: Shall we set that up on the master branch to have a safety net? and also encourage developing on secondary branches? > Even as a lone developer on several projects, I’ve messed up my master branch more than once

Federico Marini (11:47:02): > I have no direct experience with that regard

Federico Marini (11:47:31): > so I’ll let the other chime in

Aaron Lun (11:48:54): > I don’t really know either.

Aaron Lun (11:49:18): > I only messed up my master once, and that was a lesson I only needed to learn once.

Kevin Rue-Albrecht (11:52:25): > right, ok. > I mean we’re all adults and responsible here so it may not be critical if we’re all careful about pulling before pushing or rebasing where applicable, but in super brief the key features I’m aware of are: > * ensure that all required CI tests are passing before collaborators can make changes to a protected branch. > * branches can also be protected by requiring pull requests to have at least one approved review before they can be merged.

Federico Marini (12:04:56): > FYI, passing on travis check:thumbsup:

Charlotte Soneson (12:21:04): > Sorry for being late to the game, I was teaching constantly since 9 this morning (will be the same tomorrow). I have never tried the protected branch, but I guess it wouldn’t hurt to ensure that CI tests are passing before accepting a push?

Kevin Rue-Albrecht (12:35:23): > I do like the idea of a safety net (probably just the CI tests, one approved review sounds over the top). > I’ll propose the following: how about we activate the feature for a test run, and if it proves too restrictive, we disable it ?

Charlotte Soneson (12:36:04): > sounds good to me

Aaron Lun (12:36:47): > YEAH

Kevin Rue-Albrecht (12:37:20): > I appreciate your enthusiasm Aaron:joy:

Federico Marini (12:46:25): > I’m in - I would anyway wait for the travisCI log right after the commit:smirk_cat:

Charlotte Soneson (12:51:15): > As far as I can see, enabling branch protection means that you can’t push directly to the master branch: “When enabled, commits must first be pushed to another branch, then merged or pushed directly to master after status checks have passed.”

Kevin Rue-Albrecht (13:02:00): > yep, I somewhat hinted to that in my original message, but I should have been clearer i guess. > It’s a direct consequence of requiring CI test to passbeforeallowing a merge to the protected branch > this way only validated code can make it tomaster

Kevin Rue-Albrecht (13:03:34): > also, even we’re only 2-3 active developers on the project, I’m worried about all of us working directly on the same branch

Charlotte Soneson (13:03:45): > ah right, sorry, didn’t get that from your comment

Kevin Rue-Albrecht (13:06:18): > I think it makes sense having a separate branch for each new feature, so that they can be tested independently of each other during development

Charlotte Soneson (13:07:01): > yes, seems reasonable. I just activated the branch protection

Kevin Rue-Albrecht (13:11:09): > ok great. > so just to conclude, from hereon,mastershould be viewed as a ‘pull-only’ branch > before starting to develop a new feature, each of us should: > > git checkout master > git pull > git checkout -b feature_or_fix_name > git commit -m 'blah blah' > git push origin feature_or_fix_name > > and open a pull request on that branch

Aaron Lun (13:12:26): > Interesting. Sort of like a compromise between full access and an external PR, then.

Charlotte Soneson (13:13:14): > @Charlotte Soneson pinned a message to this channel.

Kevin Rue-Albrecht (13:13:27): > Yep, with the CI acting as a mediator/reviewer/failsafe/i’m out of synonyms

Kevin Rue-Albrecht (15:27:02): > btw, the second most common scenario when working with multiple branches is that someone else merges their changes intomasterbetween the moment one of us branches, and the moment they want to merge too. > In that case, each of us should > > git checkout master > git pull > git checkout feature_or_fix_name > git rebase master > [resolve potential conflicts locally] > [git commit -m 'blah blah if there was any conflict'] > git push origin feature_or_fix_name > > and open a PR as above. > Seehttps://git-scm.com/docs/git-rebasefor pretty explanatory pictures > Disclaimer: this is all off the top of my head. Please check a Git bible in case of doubt:grin:

2017-12-12

Federico Marini (12:03:36): > @Aaron LunYesterday from home I was able to check briefly the apps you linked. As you said, the functionality is somewhat basic, but in this scRNA-seq world many things can be potentially interesting “only by checking”

Federico Marini (12:04:37): > Shall we define some priorities here and now?

Federico Marini (12:04:59): > One thing would be to replicate the funcs of scater_gui in a nice way

Federico Marini (12:05:44): > Another thing, we can brutally port some code from the good ol’ ideal for the annotation import, which could be done via org.XX.eg.db packages

Federico Marini (12:08:40): > I’m happy to hear out your ideas/top things

Federico Marini (12:09:07): > … of course, the logo for the tool should be taking place 1

Federico Marini (12:09:15): > :stuck_out_tongue:

Kevin Rue-Albrecht (12:10:29): > when you mentioned sketching this weekend, I was actually wondering whether there’s any place online that we could sketch collaboratively, maybe a Google doc spreadsheet kinda thing?

Kevin Rue-Albrecht (12:11:29): > to clarify, by sketching, I mean a preview of what individual panels would look like

Federico Marini (12:13:28): > no experience on that, but would be quite cool

Kevin Rue-Albrecht (12:16:28): > hm.. Google seems to only offer Docs (Word), Sheets (Excel) or Slides (Powerpoint) > the latter could be used at a small scale, but I’m not convinced > from a quick google search, I just spotted this one that might worth a try:https://sketchboard.io(comes with Slack integration, too) - Attachment (sketchboard.io): Sketchboard.io: Online Sketch Diagramming Whiteboard for Teams > Sketch diagrams on an infinite whiteboard together with your team. Now with Slack integration.

Federico Marini (12:18:59): > This looks sleek

Federico Marini (12:19:11): > I’d say we can give it a try

Federico Marini (12:19:14): > ?

Kevin Rue-Albrecht (12:21:31) (in thread): > I definitely would like to see some annotation integration in the app. Not sure where in the priority list it falls though. > Also, I’d love to see theSCEobject declare in its metadata the annotation package(s) that the app should load, to minimise the actions to take in the app

Kevin Rue-Albrecht (12:22:53): > i’m on it (creating board and inviting by email)

Aaron Lun (12:24:17): > sounds good to me. When do you want to do this? I don’t wake up before 11 am on weekends.

Federico Marini (12:30:17): > -> I sketched the logo to call the day:smiley:

Kevin Rue-Albrecht (12:30:50): > hahaha you were so fast xD

Federico Marini (12:31:05): > @Aaron Lunwe can start just throwing the idea in this channel, and with those then sketch it out?

Kevin Rue-Albrecht (12:31:09): > it took me forever to figure out how to delete my dummy example items

Federico Marini (12:35:58) (in thread): > Ok, I’ll see how feasible/improvable it would be with the annotation

Kevin Rue-Albrecht (12:39:13) (in thread): > hang on, i’m sure i’ve seenExpressionSetobjects for microarray using that strategy

Kevin Rue-Albrecht (12:39:17) (in thread): > just looking it up

Aaron Lun (12:42:22): > I must admit I’m finding this a bit difficult to use. Maybe I’ll just watch.

Aaron Lun (12:43:22): > Too much muscle memory from Inkscape.

Kevin Rue-Albrecht (12:43:50): > hahaha, bit struggling here too, although i do like the panel on the right with lots of little predefined shapes

Kevin Rue-Albrecht (12:44:30) (in thread): > https://www.bioconductor.org/packages/3.7/bioc/vignettes/Biobase/inst/doc/ExpressionSetIntroduction.pdf

Kevin Rue-Albrecht (12:44:44) (in thread): > check out section 4.3 “Annotations and feature data”

Kevin Rue-Albrecht (12:45:58) (in thread): > i’ve seen that@annotationslot being used by GSEA packages, avoiding the need for users to specify the annotation source/version in every function call

Federico Marini (12:46:18): > Ok even if not 100% useful, we know this thing exists:smirk:

Federico Marini (12:48:56) (in thread): > I think it was much more relevant back in the microarray data - I probably never used the slot directly

Kevin Rue-Albrecht (12:49:17): > on the top priorities, I’d place: > 1) clean NAMESPACE imports to avoid warning messages currently thrown byR CMD checkandlibrary(iSEE)(I’m on it)

Federico Marini (12:49:36) (in thread): > what I meant was just a basic functionality to have for example ensemblIDs and then operate with gene symbols

Federico Marini (12:49:53) (in thread): > although, not everytime the 1:1 matching is perfectly there

Kevin Rue-Albrecht (12:50:03): > 2) more generally, polish the current MWE to start off a clean base

Federico Marini (12:50:41) (in thread): > But in any case, let’s just stick this to the potential todo list:wink:

Kevin Rue-Albrecht (12:50:49): > 3) suggestscater::calculateQCmetricsbeing run on theallenobject before passing it to the app

Kevin Rue-Albrecht (12:51:32): > 4) experiment with a couple of (linked?) interactive figures using the QC metrics from (3)

Kevin Rue-Albrecht (12:53:43): > 5) brainstorm general/advanced app settings that be given toiSEE(), but also controlled from widgets in accordingly named app panel(s), so that users may update them from within the app (e.g.,colours=list(condition=named_character_vector1, donor=named_character_vector2)

2017-12-13

Aaron Lun (12:46:42): > I was going to suggest alphabetical ordering for the names, but I see you’ve already done it.

Aaron Lun (12:46:48): > Based on the first names, of course.

Aaron Lun (12:47:11): > Totally fair and unbiased.

Aaron Lun (12:47:17): > Last names would also work for the time being.

Aaron Lun (12:47:32): > But anyway, the current MWE works on my computer.

Aaron Lun (12:48:04): > suggest usingif (!interactive()) { iSEE(sce) }in the?iSEEpage.

2017-12-15

Charlotte Soneson (07:46:05): > I managed to completely miss all these messages on Tuesday, sorry! For discussion, some things that a user might want to be able to do/set/choose, either when starting the app or from within it (many of which are also in scater_gui): > - which dimension reduction to display (alternatively make one tab for each method that is included in the object, but that might clutter things too much) > - what to color the cells by in the dimension reduction plot (can allow all the columns of colData(sce) + the expression of individual genes, perhaps in different panels?) > - heatmaps of one or more genes, clustering cells or ordering by some annotation > - similarly, boxplots/violinplots of gene expression > - should it be possible to doanykind of analysis/calculations in the app? Like, running calculateQCmetrics if this is not done, get markers for given set of cells? Where do we draw the line?

Federico Marini (07:53:33): > @Charlotte Sonesonregarding the calculateQCmetrics part, how long does it take? On smaller datasets, as well as on bigger ones? > I was thinking to have a valueBox for the QC metrics - if not there, red, and you can do that. If there, green, and browsable in a tag. > Would that fit your expectation? That would also be my line - PCA and tSNE are beyond the wall:smile:

Aaron Lun (07:55:04): > I don’t like the idea of re-runningcalculateQCMetricsin the app.

Charlotte Soneson (07:57:02): > Yes, I agree that the dimension reductions need to be done in advance. I’m not totally against runningcalculateQCMetricsin the app, mostly since it would just allow the user to add more “annotations” to the cells, that can be used to color various plots.

Charlotte Soneson (07:58:56): > I’m also wondering whether one could add (and export) new annotations, e.g. by selecting cells in a plot. This could then be used to color or order points in another panel.

Aaron Lun (08:01:56): > I think it would make our lives easier for the user to just runcalculateQCMetricsoutside. I don’t see the advantage in running it inside - worst case, if the user forgets, they can just close the app, runcalculateQCMetricson theSingleCellExperimentobject, and open the app again.

Charlotte Soneson (08:06:17): > Fair enough. So maybe let’s start simple and just allow the user to use the columns available incolData(sce).

Aaron Lun (08:08:53): > The main advantage would be if we wanted to compute particular statistics on the fly, but that’s a few steps down the line.

Aaron Lun (08:09:14): > And usingcalculateQCMetricsto compute specific statistics would be like hitting a fly with a sledgehammer.

Kevin Rue-Albrecht (08:27:50): > As Aaron made the point, I would really rather have as much as possible computed prior to launching the app, so that the app itself primarily focuses on fetching/binding the available pieces of data together for display. At least for a start.

Federico Marini (08:31:24): > Fair enough:wink:

Kevin Rue-Albrecht (08:34:04): > re: dimension reduction, why not just have a dropdown menu in ‘general settings’ to select any one to use throughout the app at any single point in time, rather than having multiple tabs (indeed cluttering things). That’s how I see the purpose of the @reduceDim slot to be honest

Aaron Lun (08:54:26): > Yes.

Aaron Lun (16:22:35): > Hey, did you guys know that you can storeDataFrames…within otherDataFrames?https://github.com/davismcc/scater/issues/43 - Attachment (GitHub): Tucking away scater’s QC stats · Issue #43 · davismcc/scater > Currently calculateQCMetrics loads up the SingleCellExperiment with a lot of baggage: library(scater) example(calculateQCMetrics) colnames(colData(example_sce)) # 37 entries! But we can hide it awa…

Aaron Lun (16:23:08): > I am pushingcalculateQCMetricsto return output like this, as it will avoid the bigcolDatavomit that it usually spits out.

Aaron Lun (16:26:35): > However, it will mean that theiSEEinterface will be somewhat more complex, as one will need to interrogate variables in nestedDataFrames.

2017-12-16

Kevin Rue-Albrecht (05:20:09): > oh right, i feel like i distractedly noticed this ‘inception’ feature ofDataFramebeing used by some packages but i’ve never directly made use of it myself. > Indeed, I guess this feature could emulate the ‘paging’ feature that was discussed at the EuroBioc meeting, and -as your GitHub issue hints to- maybe even subdivide QC metrics for the different sets of control features/samples (e.g.mitochondrial,ERCC,blank, …).

Kevin Rue-Albrecht (05:25:52): > At which point, then I guess the app would only need the user to specify which of the ‘top-level’ columns in thecolData``DataFramecontains the scater QC metrics. From that point, the app should be able to navigate to the systematically organised lower-levels to fetch any individual piece of information

Aaron Lun (08:12:32): > It should actually be fairly easy, all you have to do is to have a drop-down list of plottable variables that looks like this:

Condition
Batch
scater_stats: total_features
scater_stats: total_counts
...

So the user can then pick what things they want to plot.

Aaron Lun (10:18:24): > How’s everyone’s inkscape? I will draw out what I was thinking of on inkscape and put it on dropbox.

Aaron Lun (10:39:52): > Ah, that got boring quickly. I”ll just commit some code, then.

Kevin Rue-Albrecht (10:51:51): > haha sorry - got dropped an unrealistic deadline for next week that’s taking me away from all the fun I could have here this weekend:persevere:

Kevin Rue-Albrecht (10:54:07): > i haven’t much experience with Inkscape, but it’s never too late to learn. I’m usually using Illustrator when I need to, but I wouldn’t call myself an expert there either.

Aaron Lun (11:44:58): > I have added proof-of-concept support for variable numbers of reduced dimension scatter plots. The idea is to allow users to add more plots as they wish. Ideally, each plot will have its own options specifying which reduced dimension set to use, the components to plot. Graphical parameters (colouring, etc.) are best left as global, though we could add options to have local graphical parameters as well.

Charlotte Soneson (12:05:44): > Nice. Actually, wouldn’t one common use case would be to have multiple instances of the same reduced dimension plot, but color according to different variables? Like, sample ID and cluster assignment.

Kevin Rue-Albrecht (12:17:12): > i agree that having multiple instances of the same redDim plot with different colouring factors is more attractive than a single instance that users have to switch between the different colours. > While faceting a single figure over the selected colouring factors is undoubtedly the simplest thing to implement, I am worried about the time to display/refresh the figure for large data sets. > A more painful, yet feasible (I believe) implementation would be to let users add new (independent) figure from within the app. Possibly an application of ‘Shiny modules’

2017-12-17

Aaron Lun (10:27:58): > Done. Also, we should change the repository name, “SEE” just does not show up as the first few hits in my browser, I always have to type the full URL.

Aaron Lun (10:30:03): > Currently there is a little delay as all the plots are effectively remade from scratch when the reactives update. This could be improved, probably by moving the parameter memory store out of the reactive list and just modifying it upon construction of the plot.

Aaron Lun (10:49:16): > … which is now done. I suggest running: > > library(iSEE) > example(iSEE, ask=FALSE) > > to gethttps://www.youtube.com/watch?v=z1DzZ7oShl4

Federico Marini (14:53:22): > Well done@Aaron Lun!

Charlotte Soneson (15:30:06): > Cool! I just added a first attempt on violin plots for individual genes.

Charlotte Soneson (15:31:14): > I can change the name of the repository to iSEE (or did you have anything else in mind@Aaron Lun?

2017-12-18

Aaron Lun (04:37:45): > Yes, name change would be great

Charlotte Soneson (04:42:04): > ok, I renamed the GitHub repo to iSEE

Federico Marini (05:00:29): > @Aaron Lunit’s your destiny to be involved in pkgs with puns in it I guess

Federico Marini (05:00:58): > Surprisingly csaw, then iSEE

Aaron Lun (05:02:16): > it’s a gift

Federico Marini (05:02:24): > what is next?:smile:

Federico Marini (05:02:58): > dammit, you could have insisted on something like the latinveni, vidi, vici

Federico Marini (05:03:44): > but I can anticipate that iCame as a name would have some googling issues…

Federico Marini (05:20:10) (in thread): > do we need to change the remote for our local repo or is it automagically redirected?

Charlotte Soneson (05:21:42) (in thread): > Itshouldbe redirected according tohttps://help.github.com/articles/renaming-a-repository/, but they strongly recommend changing the remote - Attachment (help.github.com): Renaming a repository - User Documentation > You can rename a repository if you’re either an organization owner or have admin permissions for the repository. …

Federico Marini (05:26:29) (in thread): > ok, just to be safe I changed it

Federico Marini (05:26:53) (in thread): > whenever a new feature is implemented, I can check if everything works:wink:

Charlotte Soneson (05:28:53) (in thread): > :+1:

Aaron Lun (06:01:16): > Just took the violin plots to the next level. There’s an argument for using some of thescaterplotting functions to avoid rewriting all the various bits and pieces: we could discuss this with@Davis McCarthyto make any necessary improvements/generalizations to the interface.

Aaron Lun (06:01:49): > Still waiting for the damn CI integration thing before i can merge the branch. What the hell does “Waiting for status to be reported” mean?

Aaron Lun (06:04:19): > Probably because we renamed the repo. Any thoughts?

Charlotte Soneson (06:10:02): > Looks like the build passed on travis (8 min ago). I just synced the travis account, don’t know if that changes anything

Charlotte Soneson (06:14:51): > Now i havecsoneson/iSEEin the list of repos on travis. Can you try again?

Aaron Lun (06:15:58): > There we go, it’s in progress now.

Charlotte Soneson (06:16:19): > Right, sorry about that. Apparently it didn’t sync with travis automatically

Aaron Lun (07:01:30): > I would be nice to get autocomplete on those text boxes, but I don’t know how to do it.

Charlotte Soneson (07:02:22): > I think it would work withselectInputinstead oftextInput

Charlotte Soneson (07:06:22): > Like the last example here:https://shiny.rstudio.com/gallery/selectize-vs-select.html

Charlotte Soneson (07:32:10): > A couple of other suggestions for the violin plots, that I can fix unless anyone objects: > - the plots look weird if the selected x variable is numeric (the violin is put in the middle of the x range). Perhaps the violin should be removed in this case. > - the alignment of the radio buttons is off if the browser is not wide enough. We could remove inline = TRUE, which would always align them vertically > - allow plotting other expression values than logcounts to make it more broadly applicable

Aaron Lun (07:34:33): > selectInputchokes for me with >10000 possible entries.

Federico Marini (07:38:57): > @Aaron LunIt can be a case where the selectInput needs to be run with updating the selectize widget

Federico Marini (07:39:54): > I had this code snippet in theidealmain function, and I recall it helped speeding up the part to populate the entries:

Federico Marini (07:40:21): > > # this trick speeds up the populating of the select(ize) input widgets, > # see[http://stackoverflow.com/questions/38438920/shiny-selectinput-very-slow-on-larger-data-15-000-entries-in-browser](http://stackoverflow.com/questions/38438920/shiny-selectinput-very-slow-on-larger-data-15-000-entries-in-browser)observe({ > updateSelectizeInput(session = session, inputId = 'avail_ids', choices = c(Choose = '', rownames(values$res_obj)), server = TRUE) > }) >

Charlotte Soneson (07:50:40): > Even without that, it works fine for me with 18,000 values in another app

Aaron Lun (07:51:09): > Huh.

Aaron Lun (07:51:22): > Well, okay, knock yourselves out.

Charlotte Soneson (08:47:33): > Convertinggene.namesto adata.tableinstead of a character vector seems to make it a bit faster (roughly from ~19 to ~7s to initialize a new plot).

Federico Marini (09:15:25): > I have a small stub with some gene info/annotation, but I cannot get it to be included in each of the expression value plots. Maybe it is just trivial and I was unable to get the thing done o_O

Federico Marini (09:15:57): > I’ll push soon to thegene_info_anno_boxbranch

Federico Marini (09:16:20): > and have it in a box which just sticks below the latest plot

Federico Marini (09:23:23): > maybe we could be safe in adding@import shinycompletely in the namespace

Aaron Lun (09:24:48): > shrug. Don’t really like ROxgyen anyway, so do as you please.

Federico Marini (09:25:03): > :stuck_out_tongue:

Federico Marini (09:37:59): > anyway. the push to the branch is done, now merging the pull request after CI checks.@Aaron Lun, would you be able to check if the principle behind the multi-plots also applies for thishtmlOutputobject?

Federico Marini (09:38:53): > -> to test it, select mouse as species in the box on the left (org.Mm.eg.db would be required), and then type e.g. Actb as a gene

Aaron Lun (11:31:57): > Currently playing around with it.

Federico Marini (11:32:05): > Ok, I finally got the mechanism - which is, I have to admit, simple yet powerful

Federico Marini (11:32:37): > sorry for doubling/multiplying the effort

Aaron Lun (11:34:20): > The info box is very cute but I’m not sure it belongs where it currently is.

Federico Marini (11:35:01): > I know. Now it sticks to each of the plot units

Federico Marini (11:35:16): > in the last column on the right

Federico Marini (11:35:41): > feel free to move it around:wink:

Aaron Lun (11:38:07): > Well, it’s a more fundamental issue about how the interface is used in this tab. For these particular scatter plots, there is little “gene discovery”, as the user has to specify a gene name in order to get the plots in the first place. This suggests that they have to know what genes they’re interested in, which reduces the benefit of the explanatory information. This box is best suited to situations where I ask the interface, “Give me the top X genes by variability in a heatmap”, and I then go and explore the identity of those genes. Probably in a different tab.

Federico Marini (11:41:13): > True. I was thinking of a use case when some user checks this bunch of genes, and then later reports back to the PI with a quick but content-full short summary (imagining the PI/Postdoc is not up to date with the whole gene info), plus the possibility to link directly to NCBI for extra db-infos

Aaron Lun (11:44:16): > I think this would be a powerful feature for any plot where the genes are the dots. Its position in the current tab is a bit odd to me. (“Of course I know what Nanog is! Don’t need some stupid computer reminding me of that.” - PI)

Aaron Lun (11:46:33): > There is also the additional aesthetic requirement of keeping each the space for each plot relatively lean, if we are to support multiple plots. Otherwise there’s a lot of scrolling to do, and it starts to look cluttered.@Charlotte Sonesonthis was, in part, why I hadinline=TRUE; I’m fine with changing that if the horizontal doesn’t work, but if the number of options gets any higher we should consider moving the per-plot parameter options into those hidden panels that open up when you click them. Don’t know how to do that, though.

Federico Marini (11:47:54): > I agree - especially for the “no need to tell me what Nanog is”

Federico Marini (11:48:30): > For the hidden panels part, I used inidealthe collpasible panels from shinyBS

Federico Marini (11:48:35): > could be one way to go

Aaron Lun (11:48:59): > Happy for you to give it a shot.

Federico Marini (11:49:24): > from the time I implemented that, it could be that some better ways came along. nevertheless, collapsible panels worked quite nicely

Federico Marini (11:49:35): > I’ll see what I can do:wink:

Aaron Lun (11:50:30): > If that works, we can go crazy with the plot parameters, e.g., supportsize_by,shape_by, etc.

Kevin Rue-Albrecht (11:53:54): > wow. glad to see the project getting to that level of activity! can’t wait to join back in the fun of implementation

Federico Marini (11:56:24): > Ok:slightly_smiling_face:I had some time to invest and be up to date with the whole new features that came!

Federico Marini (11:58:01): > We can move/remodel the output where it is required - indeed, inidealI have it exactly in a situation after clicking with an MAplot

Federico Marini (11:58:04): > https://youtu.be/EckimPqRcCg?t=168 - Attachment (YouTube): Demo for pcaExplorer and ideal

Federico Marini (11:58:58): > One thing that could be a nice support for us all, and not just for this app

Federico Marini (11:59:16): > I recall I used once a pkg to check the structure of an app

Federico Marini (11:59:41): > it was not perfect and it enforced the ui.R/server.R split

Federico Marini (12:00:14): > still.. ShinyTest was quite a nice thing:wink:

Federico Marini (12:00:16): > http://amitkohli.com/announcing-shinytester-a-package-that-helps-you-build-shiny-apps/ - Attachment (AmitKohli.com): Announcing ShinyTester – a package that helps you build Shiny apps > Shiny is awesome, but can be a bit daunting and easy to make mistakes in. I recently came back to Shiny after a hiatus of a few years and it was much more challenging than I feel comfortable admitt…

Federico Marini (12:00:29): > also on CRAN

Federico Marini (12:18:44): > @Aaron Lunone thing I do not get right away: what is the difference in the 2 inputsGene Expression:andX-axis gene expression:?

Aaron Lun (12:51:51): > You can plot one gene against the other. The first one could be called “Y-axis”, if it helps.

2017-12-19

Aaron Lun (04:59:31): > Moved the info box to a better place, with DT::datatable for gene exploration. I would suggest having theorg.*.eg.dbspecification as a function argument toiSEE, as this should be fixed for the entire dataset; in 99% of cases, it doesn’t make sense for the user to change it on the fly. (And in some cases, it wouldn’t make sense at all if the features are not genes.)

Kevin Rue-Albrecht (05:22:07): > Hi@Aaron LunCheck out section 4.3 “Annotations and feature data” > How about encouraging an element$annotationin the@metadataslot ofSingleCellExperimentBased on the linked documentation it could be a character string of length 1, with the name of theorg*.dbpackage - Attachment: Attachment > https://www.bioconductor.org/packages/3.7/bioc/vignettes/Biobase/inst/doc/ExpressionSetIntroduction.pdf

Kevin Rue-Albrecht (05:23:46): > (although, yes, it doesn’t hurt to have an argument toiSEEable to specify/override it on the fly)

Aaron Lun (05:31:12): > Not sure how much help it is to have a dedicated annotation field inSingleCellExperiment. The benefit would only be apparent if many downstream functions need to draw from a specifiedorg.*.eg.db, but this isn’t usually the case with my workflows. I assign all my annotation at the start, and that’s that. TheSingleCellExperimentmaintainers would also be reluctant to impose more gene-based structures on the container, as they want it to be general to other types of single-cell data (e.g., methylation, for which anorg.*.eg.dbannotation doesn’t make sense). It would be more transparent and less work foriSEEto accept anorg.*.eg.dbobject directly.

Aaron Lun (05:34:18): > The function would also need to accept thekeytypeand some indication of whichrowDatafield contains the keys (or the row names, ifNULL). This reflects the fact that I usually need to mangle my gene symbols to guarantee uniqueness/non-missingness.

Kevin Rue-Albrecht (05:37:58): > yep, makes sense - i just realise now that it only really makes sense for microarrays which, once designed, can be linked to annotations for the type of features that they measure, sequencing experiments are more diverse in this regard

Federico Marini (07:31:46): > @Kevin Rue-AlbrechtYes, back then it was a welcome feature.@Aaron LunThank you for re-organizing the structure. I’ll soon look into the collapsibles/some better option, and I am also pro having the org.XX.eg.db package as a parameter.

Federico Marini (07:33:51): > I wonder how complex it would be to have some kind of heuristics for autodetection of species and ID type. Not in the scope of the app, but just out of curiosity (anyone of you already tried out?)

Kevin Rue-Albrecht (11:19:16): > yep i did, although it was my first R/Bioconductor package (GOexpress), so there’s a lot i’d like to do differently now

Kevin Rue-Albrecht (11:21:31): > however, the more I look back, the more I think it’s overcomplicating a problem that is much more easily resolved by asking the user to supply any sort of identifier for the annotation resource/dataset to use

Kevin Rue-Albrecht (11:22:39): > you can check out helper functions in this script:https://github.com/kevinrue/GOexpress/blob/master/R/toolkit.R - Attachment (GitHub): kevinrue/GOexpress > GOexpress - Analysies of gene expression data using Gene Ontology

Federico Marini (11:24:42): > Ok, then most likely an overkill:slightly_smiling_face:Good to know, in the end we canreallyexpect the user to know what the data in her/his hands are

Kevin Rue-Albrecht (11:29:46): > Yep, my current view is that it’s a fair request to expect users to know what features are measured in their data set is about, and as a consequence which annotations best describe them.

Kevin Rue-Albrecht (11:32:11): > As a more ‘manual’ input, I’d say it is also reasonable to accept the GTF file that was used to quantitate features, provided the user also declares which field was used as feature identifier

Federico Marini (11:37:10): > hm, gtf tend to be hug-ish - compared to the compact annotation pkgs. Now they even could useAnnotationHub

Kevin Rue-Albrecht (11:46:56): > nice littleBiocFileCachewith that:slightly_smiling_face:

Federico Marini (12:50:50): > @Aaron LunI implemented the collapsible panels, for both redDim and geneExpr

Federico Marini (12:51:01): > Separate branch is collapse_params

Federico Marini (12:51:11): > which soon should be merged into master

Federico Marini (12:54:40): > … ok, now onmaster. For the design part: > - I left the panels open by default, and they can be closed. We can always change that > - for the gene expr: the y-axis gene is left out as it is the main, mandatory one > - hope you don’t mind I put some FA-icons and coloured it up in a suggestive way

Aaron Lun (13:52:18): > Deep in a brutal battle withtestthat, will have a look at the PR once I’m done.

Aaron Lun (15:21:28): > @Federico Marini

Aaron Lun (15:21:34): > oops

Aaron Lun (15:21:43): > Anyway, it looks good, except for a few things.

Aaron Lun (15:23:05): > The first is that, for some reason, runninglibrary(iSEE); example(iSEE, ask=FALSE)on my computer doesnotproduce the green box at the top, nor the first reduced dimension plot. It is only after I dolibrary(shinyBS); example(iSEE, ask=FALSE)that everything starts working properly. Perhaps have a look into that, maybe there’s a missing import.

Aaron Lun (15:24:47): > The second is that the collapsible fields reset to their original open/closed state whenever I change the number of plots. I presume that the open-ness of the fields is stored somewhere in theinputfor each collapsible field? This should be added to the memory (reddim_plot_param, I think it’s called) to remember which fields are open and closed, so that this is preserved upon changing the number of plots.

Aaron Lun (15:25:43): > Finally, I think only the graphical parameters need to go into the collapsible fields - the type of plot (PCA, etc.) is critical to its interpretation and so should be left outside - or at least, in a separate collapsible field.

Federico Marini (15:31:36): > @Aaron Lun1 - good catch. the behavior is somewhat strange. It can be it is one of those packages that kick in when explicitly loaded > 2 - that thing I did notice. I’ll look into it further. My aim was to get a version for you all to see and provide feedback - mission accomplished also with… > 3 - good point. I did not want to mess around too much:slightly_smiling_face:

Federico Marini (15:32:53): > One interesting feature: can we project the expression of more than one gene on the redDim plots? I am thinking of a use case with e.g. bunch of markers that behave similarly

Federico Marini (16:06:11): > for point 1, I recalled correctly: seehttps://ebailey78.github.io/shinyBS/install.html#using_shinybs

Federico Marini (16:06:56): > the problem is that if we put the call tolibraryin the pkg, a warning is raised. AndrequireNamespaceis “not enough”

Federico Marini (16:11:57): > if there’s no other way, I’ll see some other options

2017-12-20

Federico Marini (03:18:31): > point 1: it runs fine by just adding shinyBS to the depends - as an alternative I was thinking ofshinydashboard::box. Let’s see which one is better fit for point 2

Federico Marini (03:56:01): > for point 2, I was not able to work out a satisfying solution for all panels, somehow the mechanisms behindupdateCollapseare not so optimally matching the way we are planning to store the parameters. A workaround would be to trigger the updates with the pressing of the new plot button but I am still not fully happy (as I said, I could not find a way yet to set/get the open panels for each without complicating it too much). We could collapse all the previous panels except the latest plot, but that is also not perfect. Would that sound reasonable to you?

Charlotte Soneson (04:48:55): > I don’t have much experience with collapsible panels, but can we give eachbsCollapsePanela (unique)valuein addition to thetitle, and then store somewhere for eachvaluewhether it is open or closed, and set the status correctly in theupdateCollapse?

Charlotte Soneson (04:50:34): > Unrelated, I just added the option to change the assay type in the violin plots.

Federico Marini (04:54:52) (in thread): > I would need to check that, maybe later today. Seems reasonable, but I could not get something like this working right away

Federico Marini (05:01:49) (in thread): > I do not know how to get the attribute open/closed for each, e.g. after we opened/closed manually

Federico Marini (05:02:06) (in thread): > If someone has some time to look into this, I’d be grateful:slightly_smiling_face:

Charlotte Soneson (05:56:56) (in thread): > seems that if you do e.g.input$collapse_redDimPlots1, it will return all the open panels in thisbsCollapsegroup (NULL if there are no open panels)

Charlotte Soneson (06:02:58) (in thread): > I may be on the way to a solution, but have to go to a meeting. Will continue later unless someone else solves it before:slightly_smiling_face:.

Federico Marini (06:11:42): > Following up on my own suggestion: a cool feature would be to have the following: > - autocompletion via selectizeInput/updateSelectize for selecting the gene name > - if one gene is selected, just like as it is now in the redDim plots > - if more than one, do something like the coloring is mirroring e.g. the max of each of the selected genes (say, known markers for cell type) > - and of course, have evtl. more plots on the same page > > If time is on my side, I’ll try to make up a minimal example in another tab, to avoid chaos in the redDims - Attachment: Attachment > One interesting feature: can we project the expression of more than one gene on the redDim plots? I am thinking of a use case with e.g. bunch of markers that behave similarly

Federico Marini (07:42:00): > -> very raw, but to see it in action: first implementation is inhttps://github.com/csoneson/iSEE/tree/multigene_reddims - Attachment (GitHub): csoneson/iSEE > Contribute to iSEE development by creating an account on GitHub.

Federico Marini (07:42:44): > (for trying it out, I kept a bunch of genes, and added housekeeping genes & Ctcf)

Aaron Lun (08:05:35) (in thread): > Looking at this now.

Aaron Lun (08:06:53): > I’m not sure what it means to colour by multiple markers. It seems much more intuitive to (i) use multiple plots, or (ii) ask the user to define some sort of aggregation score that can be used for coloured.

Charlotte Soneson (08:24:09) (in thread): > Ok. I just returned from my meeting, let me know if you want me to commit what I have. Basically, adding avalueto thebsCollapsePaneland checking whetherinput[[paste0("collapse_redDimPlots", arg)]]is NULL or not for each plot in the plot addition seems to go at least part of the way.

Aaron Lun (08:27:47) (in thread): > Give me a half an hour to test out what I’ve got.

Aaron Lun (08:42:13) (in thread): > Okay, done.

Aaron Lun (08:42:57) (in thread): > I have a solution using ourpObjectsmemory rather thanupdate*, which provides a smoother experience (asupdatewill initialize it open and the close it, which is a bit weird).

Aaron Lun (08:46:10): > Currently going through a major reorganization of the various string constants in the code, to avoid things breaking when we decide to rename something; I suggest no one touch anything for a while.

Federico Marini (08:49:03): > @Aaron Lunmessage received:wink:

Federico Marini (08:50:53): > For the multiple markers, i was thinking of the fact that some cell identities might be better defined by the ensemble of expression values for some known markers. > In the end, it can also be that this possibility of choosing >1 gene is default, and an extra parameter could be the function to apply to the values per sample (as of now,max) - Attachment: Attachment > I’m not sure what it means to colour by multiple markers. It seems much more intuitive to (i) use multiple plots, or (ii) ask the user to define some sort of aggregation score that can be used for coloured.

Federico Marini (08:51:53): > It also depends somehow how much we might want to mimic the functionality available in the 10x CellLoupe

Federico Marini (08:52:46) (in thread): > @Aaron Lunand@Charlotte Soneson: thank you for picking up on this!

Aaron Lun (08:53:17): > what do they do?

Federico Marini (08:55:35): > https://support.10xgenomics.com/single-cell-gene-expression/software/visualization/latest/tutorial-celltypes

Federico Marini (08:56:11): > –> > > With CD79A and CD79B in the list and 'Gene Exp Max' as the selected attribute, the coloring of the plot represents the maximum transcript count between CD79A and CD79B in each cell. Selecting a single gene within a list shows the expression level for that single gene. >

Federico Marini (08:57:32): > so… pretty much in line with my brutal draft

Aaron Lun (08:57:55): > I don’t think that’s necessary when we have multiple plots.

Aaron Lun (08:58:25): > It seems like they painted themselves into a corner with only one plot.

Aaron Lun (08:58:37): > And they try to get out of it by allowing some crazy colouring

Charlotte Soneson (08:58:40): > It would also somehow assume that expression values are comparable between genes, which may be the case for 10X tag counts, but not in general.

Aaron Lun (08:58:54): > Good point

Federico Marini (08:58:57): > True@Charlotte Soneson

Federico Marini (08:59:46): > Ok - we can still save something with theselectizeInputthat basically supports autocompletion, which can be very useful all around

Federico Marini (09:00:30): > (I don’t know why theupdateSelectizedid not work correctly, therefore the selection restricted to just 1k genes)

Aaron Lun (09:48:30): > Almost done, waiting for CI. I will work on the interface next to allow people to pass defaults in (e.g., if you’re setting up a shiny server for other people to look at your data).

Federico Marini (09:52:22): > Great work:wink:

Aaron Lun (11:46:31): > still going with the interface, stand by.

Aaron Lun (12:02:27): > Just CHECKing locally on my machine before pushing, stand by.

Aaron Lun (13:02:01): > Currently pushed. For those who are interested: all initial parameters can now be set by passing relevant inputs to theiSEEfunction, with parameter defaults described indefaults.Rd. This means that users can write scripts to directly initialize the interface with the plots of interest, especially useful for Shiny servers. > Internally, all server-related constants are now stored inconstants.R. This probably doesn’t help code readibility but is especially useful if you are to change their values, e.g., for more intuitive naming of user-supplied default arguments. The presence of a central list of constants avoids the need to hunt down every instance of the constant in the package to avoid crashing the interface. Aesthetic constants (e.g., text that shows up for the user’s viewing pleasure) are left as they are, as this matters less.

Aaron Lun (13:03:02): > @Federico MariniIt’s a shame thatshinyBSneeds to beDepended. Is this fundamental to its use or is the author just unaware of theImportmechanism?

Federico Marini (13:10:14): > @Aaron Lunyep, I thought the same. But let’s put it like this, it was probably developed with shiny apps in mind that do not reside in a package i.e. have to suffer painfully if the package is not just imported. I don’t know what would be feasible to change the behavior

Federico Marini (13:12:34): > Seeing the version history of the project here…https://ebailey78.github.io/shinyBS/changes.html

Federico Marini (13:12:54): > it does seem not so currently developed

Federico Marini (13:12:58): > pity indeed

Aaron Lun (13:13:50): > Might be worth asking, given it’s CRAN policy to favour Imports over Depends. It might be as easy as them exporting something that was missing. In any case - do we have any alternatives?

Federico Marini (13:16:13): > I am aware of the following: > -boxfromshinydashboard

Federico Marini (13:16:55):


box(..., title = NULL, footer = NULL, status = NULL,
  solidHeader = FALSE, background = NULL, width = 6, height = NULL,
  collapsible = FALSE, collapsed = FALSE)

Federico Marini (13:17:47): > -> probably fitting the usage we plan with the update of params

Federico Marini (13:17:51): > or…

Federico Marini (13:18:27): > -bsplus

Federico Marini (13:18:30): > http://ijlyttle.github.io/bsplus/articles/overview.html?utm_content=bufferc1240&utm_medium=social&utm_source=twitter.com&utm_campaign=buffer#collapse

Federico Marini (13:19:27): > -> this one seems more complicated to insert in our setting (seems to be tightly linked to buttons?)

Federico Marini (13:20:13): > if some of you have other pieces of knowledge I did not report, please feel free to complete my answer

Aaron Lun (13:30:50): > Thanks.boxlooks like the way to go, then.

Aaron Lun (13:31:00): > Currently a few bugs in themaster, fixing now.

Aaron Lun (13:42:06): > Okay, it’s all good to go. That’s me done for the week, knock yourselves out.

Aaron Lun (13:46:07): > The major remaining to-do is how to handle point selection and brushing, especially when we have lots of points.

Federico Marini (13:51:09): > where do we mainly want the brushing and the interactions?

Federico Marini (13:52:26): > and on top of this: do we want to do something when cluster-like info is available?

Aaron Lun (13:54:05): > Brushing and interactions should be possible for all cell-based plots. For example, I could select some cells that are outliers in PCA, and see how they behave with respect to particular genes. (I should also add some plots for plottingcolDataagainst each other - that’s another thing on the to-do list). Conversely, I might select a cell that has a very large library size and ask where it appears on the PCA plots.

Aaron Lun (13:55:35): > Regarding cluster information - I don’t think it’s necessary if it doesn’t require different treatment from other types of row/colData. Or to put it another way - what kind of stuff that we can show for cluster data, and only cluster data?

Federico Marini (13:57:45): > I was again looking at the CellLoupe tool

Federico Marini (13:59:29): > I don’t know how generalisable and meaningful it would be to do this pseudoDE-analysis, in terms of aggregating in silico the counts/expr values of genes by clusters, e.g. defined via kmeans on the tSNE plot (seems something commonly done, but I’m quite stranger to what is standard, what is extended analyses)

Aaron Lun (14:01:57): > I suspect cluster-specific averages should be computed by the user ahead of time, in which case they would show up in the datatable tab; but in any case, the violin plots would be more informative anyway.

Federico Marini (14:24:30): > Ok I’ll think of something > In the meanwhile, we can fix/complete tiny things as we run up into them

Federico Marini (14:26:05): > @Aaron LunI don’t know how far the goal line would be from the current standpoint. I would say we ended up doing quite most of the main stuff already - and as a nice side effect, I learned a lot alone from the nice trick of multiplot updates

Aaron Lun (14:26:28): > Two major things: brushing and the log of commands

Aaron Lun (14:26:44): > If you report a log, people can just copy-paste the R code equivalent to make the plots they want.

Aaron Lun (14:26:51): > That would be the hope, at least.

Kevin Rue-Albrecht (14:27:26): > sorry that I dropped out of the conversation for a while.@Aaron Lunyou mentioned a to-do list, is there a shared document somewhere where we can keep track of those, and pick up items to implement?

Aaron Lun (14:27:49): > I guess the github wiki would be a good place? Never really used it, though.

Charlotte Soneson (14:28:12): > What about using GitHub issues?

Kevin Rue-Albrecht (14:29:33): > I like the issues indeed, there are tags to mark ‘enhancements’ (which I would use to describe new features). > I’ve used the wiki feature in the past, which is basically managed as an independent repository. But I found that place more useful for static information (e.g. tutorial)

Aaron Lun (14:30:19): > Okay, we can do that.

Federico Marini (14:32:27): > Issues seem the best place. Might even be that some good soul apart from us picks up on some open ones:smile:

Charlotte Soneson (14:33:01): > Or provides additional ones:wink:

Federico Marini (14:33:18): > yeah, or that too:stuck_out_tongue:

Federico Marini (14:49:14): > About the brushing: the linked plot(s?) would be then positioned close to each of the multiplots, right?

Federico Marini (14:50:23): > Example, a heatmap with most variable genes, with clustering enforced on the rows but the columns rather ordered by “selected VS unselected cells”

Federico Marini (14:50:53): > Or… one separate panel, where just one main plot is available

Federico Marini (14:51:12): > I am trying to picture out how it would look like in the end

Federico Marini (14:52:07): > Maybe one panel where all these plots linked to each other would be a tidy thing (tidy not in the Wickham vision)

Aaron Lun (14:53:34): > Let’s not think about heatmaps for the time being. But for brushing, I envision that everything would literally be linked - you could brush on one plot and see the results on any cell-based plot in any of the tabs. This should be very possible, the question is how reactive it should be. Full reactivity would be too slow for large numbers of plots; I am more inclined to have a button on the left with “highlight selected” that a user can press once they’ve gotten the points they want. Such a button could also be plot-specific, making use of another collapsible box.

Aaron Lun (14:54:28): > You could imagine “gating” on a CD4-high population (or indeed, a double-positive population for two markers of interest) using the gene expression plots, and then brushing to see where they show up on the t-SNE. This would provide an intuitive alternative to Loupe’s craazy Max-of-two-values thing.

Aaron Lun (15:02:41): > Okay, some github issues up. The final thing before I retire for the night is for you guys to ponder; do we want to reusescater’s plotting functions, or do we want to write our own? The former is easier but the latter will definitely give us more customizability - particularly as Davis is rather intermittent at updatingscater, and there’s at least a number of things that are suboptimal for our use cases. However, if you want to do the latter, then someone else will have to take charge of the plotting, because I hate ggplot.

Federico Marini (15:12:10): > Last round for me tonight too: > - reactivity & brushing: I need to revisit what is actually allowed by the shiny framework. I have experience in dragging & clicking, plus interacting with a DT datatable > - for the repro: so far we always save basically all the parameters. It sounds feasible to somehow extract these info back from where we store it, and generate the code, “tab by tab”, and place it in an instance of ashinyAceeditor. > - for the plots. This is somehow related to the brushing, too. ggplot objects are damn easy to insert in the whole reactivity-framework, whereas base objects are trickier. That at least was the last time I checked:stuck_out_tongue:

Federico Marini (15:14:40): > uh, and of course, potential GH issue: > - I can look out how to do the mini-introjs-based tours, if the feature is still wanted. It is already pretty self-explanatory, but some pointers for the first usage can always be welcome

Kevin Rue-Albrecht (15:15:58): > yep - big fan ofggplot2here as well. happy to help with writing our own plotting functions. > even when usingscaterat the command line, i often end up overriding thescale_*which raises a few warning. Not the end of the world, but it would probably be cleaner to implement the individual layers in the app itself, rather than adding them on top of theggplotobjects returned byscater

2017-12-21

Kevin Rue-Albrecht (04:26:29): > @Kevin Rue-Albrechtshared a file:Failed install of rjson package - File (Canvas): Failed install of rjson package

Unknown User (04:26:29): > @Kevin Rue-Albrecht commented on @Kevin Rue-Albrecht’s file https://community-bioc.slack.com/docs/T35G93A5T/F04CS4Z17TJ: Sorry to bother you guys with that, but i can’t find a post online that describes the same issue. Did anyone run into problems installing rjson as a dependency to iSEE ? - File (Canvas): Failed install of rjson package

Kevin Rue-Albrecht (04:27:33): > My laptop installed it fine so I’ll be able to work on there. But the iMac at work fails with the error paste in the post above

Charlotte Soneson (04:38:52) (in thread): > It works for me. I’m always puzzled by these errors so this is just a random guess, but are you by chance using homebrew? I think this can cause problems like this (e.g.https://github.com/igraph/rigraph/issues/191) - Attachment (GitHub): Fail to compile with R 3.4.0 (homebrew) under Mac OS · Issue #191 · igraph/rigraph > From the console: installing to /usr/local/lib/R/3.4/site-library/igraph/libs **** R **** demo **** inst **** preparing package for lazy loading **** help ***** installing help indices **** building package indi…

Federico Marini (04:40:58) (in thread): > Same as for Charlotte, but as she said, brew could be the one to blame?

Federico Marini (04:41:28) (in thread): > Sometimes brew is the blessing, sometimes the curse.

Kevin Rue-Albrecht (04:41:32) (in thread): > yep - i’m using homebrew despite having had some bad experiences with it before

Charlotte Soneson (04:42:14) (in thread): > then it’s perhaps worth checking the paths to gcc/clang

Aaron Lun (04:42:26) (in thread): > It’s the old C++11 problem. I have experienced something similar withbeachmat, seehttps://support.bioconductor.org/p/104005/.

Federico Marini (04:43:42) (in thread): > I recall having nasty experiences back when I wanted to install the primordial versions of the IRkernel, based on the zeromq libraries

Kevin Rue-Albrecht (04:46:04) (in thread): > it may be related, but I ended up installing R-devel from the .pkg installer because when I installed from source, the new R executable was not detected by RStudio, although the terminal had no problem finding it (https://community.rstudio.com/t/rstudio-does-not-seem-to-scan-standard-locations-as-declared/3494/3) - Attachment (RStudio Community): RStudio does not seem to scan standard locations as declared > Thanks for your reply. I should have said, I also checked all the paths that RStudio is supposed to scan, and /usr/bin/R doesn’t exist. Thanks for the note about ‘open’ Looking forward to further advice. Kévin Envoyé de mon iPhone

Federico Marini (04:46:51) (in thread): > Uh, R-devel is for me always via .pkg - at least on mac

Kevin Rue-Albrecht (04:47:30) (in thread): > Thanks@Charlotte Soneson, indeed that could also be a reason, as homebrew symlinked g++ and gcc, I’m losing track of which executable is actually installed from where -_-

Federico Marini (04:47:39) (in thread): > It ended up being with less pain then the source

Kevin Rue-Albrecht (04:47:55) (in thread): > I know the feeling Federico ^^

Federico Marini (04:49:15) (in thread): > I wish I could be an expert on this and tell you the solution right away… Could have saved me some major time in other occasions

Aaron Lun (04:52:17) (in thread): > Ah, you mac people.

Kevin Rue-Albrecht (05:17:10) (in thread): > solved (self-slap)

Kevin Rue-Albrecht (05:17:29) (in thread): > > #CXX=/usr/local/bin/gcc-7 > CXX=/usr/local/bin/g++-7 >

Charlotte Soneson (05:17:37) (in thread): > :+1:

Federico Marini (05:17:55) (in thread): > cool!

Kevin Rue-Albrecht (05:17:58) (in thread): > I just switched from the first to the second in~/.R/Makevars

Federico Marini (05:18:12) (in thread): > (not that you self-slap yourself :P)

Federico Marini (05:18:33) (in thread): > good to keep in mind, it can be a next failure reason

Kevin Rue-Albrecht (05:20:03) (in thread): > btw, Fede,R Under development (unstable) (2017-12-20 r73933) -- "Unsuffered Consequences"just compiled from source without incident for me (as opposed to another nightly build a few weeks ago). > I guess it’s some (R)ussian (R)oulette situation:wink:

Federico Marini (05:22:03) (in thread): > I love tonothave those bets when I “just want to work/develop something”

Federico Marini (05:22:06) (in thread): > :smile:

Aaron Lun (09:22:14): > I will tackle the brushing on the weekend. I would suggest splitting off the plotting functions into a separate file, where each plot function returns the ggplot object and the call used to generate it. This should reduce the size ofiSEE.R, insomuch as this is possible.

Kevin Rue-Albrecht (09:28:10): > on a bug-fix note: > is it desirable that the ‘gene expression’ box is a free text field, rather than a dropdown? > is this a consequene of@Aaron Lunpointing out issues with dropdown that had too many values?

Aaron Lun (09:28:54) (in thread): > I do wish for a better way to do this. Yes, it would be nice to get some autocompletes here, but a several second delay in loading is pretty brutal.

Kevin Rue-Albrecht (09:30:31) (in thread): > ok, no worries > i can add avalidate(need(...))statement to produce a friendlier message than the redsubscript out of boundscurrently displayed if the gene does not exist

Aaron Lun (09:31:27) (in thread): > Possibly it could also say “do you mean these genes…”

Kevin Rue-Albrecht (09:32:41) (in thread): > I’m almost done with my local duties (two different sets of collaborators want plots for manuscripts to submit over Christmas). I really look forward coding a bit with you guys again

Kevin Rue-Albrecht (09:33:23) (in thread): > I had a feature like that suggestion in myGOexpress. Let me find it again

Kevin Rue-Albrecht (09:33:50) (in thread): > here:https://github.com/kevinrue/GOexpress/blob/master/R/post_analysis.R#L61 - Attachment (GitHub): kevinrue/GOexpress > GOexpress - Analysies of gene expression data using Gene Ontology

Kevin Rue-Albrecht (09:37:18) (in thread): > anyway. don’t worry about it, it’s a small thing and I’m happy to take care of it in the next couple of days. it’ll let me get up to speed with the recent code udpates, and let you focus on the brushing

Aaron Lun (15:15:54): > I recently realized that our current interface is a bit clunky for what people want to do. In particular, I was looking at one of my colleague’s apps (http://marionilab.cruk.cam.ac.uk/organogenesis/); to get the same behaviour iniSEE, the user needs to click through three sets of tabs, which is three too many. Thus, I’ve dropped my weekend brushing plans to instead reorganize the interface so that everything is on one page, while still being fully customisable with regards to adding new plots, etc. I won’t do anything tomorrow because I need to go yell at my bank, but you can expect the interface to go through a major overhaul on the weekend. If someone can getshinydashboard::boxto work, that would be great.

Kevin Rue-Albrecht (15:46:15): > ok, i agree that the interface needs a bit of thinking. > i’ll push some code in the next hour where i’ve addressed the ‘invalid gene name’ issue, just cleaning up now

Aaron Lun (15:56:45): > No rush, I’m too tired to do anything oniSEEtoday.

Kevin Rue-Albrecht (15:57:31): > note that for the time being, i’ve put the pattern matching code iniSEE.Ritself, but i also agree with you that we should think twice whether some code can be extracted into separate files. > This is a particularly good example

Aaron Lun (15:57:51): > Yeah, it’s a real shame that shiny code tends to result in a huge file. This makes it difficult for collaborative projects like this, especially given that the weekend will just be taken up by my refactoring.

Aaron Lun (15:58:22): > The refactoring will likely touch everything iniSEE.R, so it’ll be hard for others to work on this without resulting in a giant heap of merge conflicts on Monday.

Kevin Rue-Albrecht (16:00:24): > well, i understand Federico’s original point that putting ui and server in the same file allows sharing some internal variables. > InTVTB, i’ve adopted the intuitively ‘cleaner’ approach of splitting my code intoui.Randserver.R, but that forced me to use some tricks to work around limitation

Kevin Rue-Albrecht (16:24:29): > Yep, i’ll be flying and seeing family so good timing to leave you refactoring stuff. > To follow up on the code extraction, i’m keen to extract the code in a separate.findGene(x, object, where)helper function > Not a top priority (please let me know if you do like the idea though), but in addition to the current behaviour (if gene doesn’t exist, suggest regex matches), that would also give more space to allow a ‘search path’ to scan for the input gene name. > What I’m thinking here iswhere=c("gene_name", "SYMBOL")being a character vector of the field names to scan, akin to a$PATH: if an exact match for the query gene name is not found in therownames, then for example search next inrowData(se)[,"gene_name"], then mayberowData(se)[,"SYMBOL"]. > If none of the fields have an exact match, then fall back on suggesting close matches. > Just to tell you that I’m aware of caveats: anything else thanrownamesmay contain duplicate values. I won’t bother you with details, but I’m thinking of that case too.

Federico Marini (19:22:56) (in thread): > My take on this:selectizeInput, coupled with a updateSelectize call in the server function should work. Importantly, the parameterserveris set toTRUE

Federico Marini (19:23:18) (in thread): > I have a similar implementation inideal

Federico Marini (19:23:31) (in thread): > where the gene list is in the side panel

Federico Marini (19:23:47) (in thread): > inspiration for the solution was taken from here:https://stackoverflow.com/questions/38438920/shiny-selectinput-very-slow-on-larger-data-15-000-entries-in-browser - Attachment (stackoverflow.com): Shiny selectInput very slow on larger data (~15,000 entries) in browser > I have this basic shiny app, and it is blazing fast in the ‘Viewer’, but when I use the ‘Open in Browser’ option, the select input choices take a while to load. selectList <- sapply(1:15000, fu…

2017-12-22

Aaron Lun (10:04:16): > Well, my bank yelling trip has been delayed until tomorrow, so I’ll start fiddling with stuff today instead.

Aaron Lun (10:04:45): > Actually, scratch that, I’ll just do it on Sunday.

Aaron Lun (17:18:34): > I have begun the overhaul; you can see a minimally working example oninterface_overhaul. Note that for the next stage, any of the gene choices in any the plots can be dynamically linked to anydatatablein any other panel, thereby solving our gene selection problem.

Aaron Lun (17:19:53): > This also demonstrates an actual use for the side bar, in keeping track of dynamic addition of panels. The next stage will be to allow for the reordering and resizing of particular panels.

2017-12-23

Aaron Lun (11:38:34): > I wonder whether we’re making life difficult for ourselves by allowing users to dynamically change the number of plots. It would be much easier to have the number of plots fixed upon launching the app (though obviously it can still be altered upon launch, by altering the arguments to theiSEEfunction). This would allow us to avoid the memory store - in particular,datatablewill always forget what was selected, meaning that anyone adding a new plot will wipe out their prior selections in any table panel.

Aaron Lun (11:52:41): > Scratch that, I figured out how to trigger re-creation of thedatatable. It doesn’t save the search, but at least the selected row is unchanged; this avoids triggering recreation of all linked scatter plots.

Aaron Lun (12:00:55): > And now that, too, is fixed. There is a little flash with thedatatableas it re-renders, but I guess that’s okay if people aren’t adding plots all the time.

2017-12-24

Kevin Rue-Albrecht (11:09:40): > Looking forward to the result of the pull request. > To be honest, I am (also, if that’s your point) still wondering whether a dynamic number of plot is more attractive/useful than a well-organised layout with a fixed number of plots.

Kevin Rue-Albrecht (11:16:45): > Anyway. In the meantime: merry Christmas and a Happy new cell!

Aaron Lun (11:17:04): > MY VISION IS COMPLETE

Aaron Lun (11:17:16): > though the brushing is not fully implemented yet.

Kevin Rue-Albrecht (11:23:16): > I just pulled the master branch

Kevin Rue-Albrecht (11:24:02): > Let me just say::astonished::+1:

Aaron Lun (11:30:13): > Needs some serious aestheticization, but the underlying Shiny machinery is all there.

Kevin Rue-Albrecht (11:32:48): > Exactly.

Kevin Rue-Albrecht (11:33:06): > I really like the link with the gene table too

2017-12-25

Aaron Lun (08:01:21): > @Federico MariniI figured out theshinyBSDependsproblem. InshinyBS/R/misc.R, there is an.onAttachcall; this should be changed to.onLoadto allow people toImportthe package.

Aaron Lun (08:05:55): > Unfortunately, looking at the github issues suggests that the maintainer is no longer responsive. Never mind commits, he/she isn’t even responding to issues.

Aaron Lun (11:12:07): > Well, anyway, all the underlying Shiny machinery is now sorted out. Now we just need people to make it pretty.

Federico Marini (15:02:15) (in thread): > Thank you for checking it out

Federico Marini (15:36:38): > Just peeking in the master since I am quite caught between relatives, kids, and more

Federico Marini (15:37:17): > I have to say I was skeptical at the beginning with the brushing-all option, but hey, this is super neat

Federico Marini (15:37:30): > Excellent work

Federico Marini (15:38:31): > Very nice look:slightly_smiling_face:

Federico Marini (15:39:44): > … and very nice way to say “you all have a merry christmas time” with code:wink:

2017-12-27

Aaron Lun (13:33:41) (in thread): > I’ve put in our own.onLoadto avoid having toDependsonshinyBS. Unfortunately,shinydashboard::boxdidn’t work out because it doesn’t seem to report the open/closed status. Well, not easily, anyway.

2017-12-28

Federico Marini (08:41:38) (in thread): > Uh ok, then, we justImportit. Too bad theboxdid not work out, we would have stick to a pkg we already had in

2018-01-03

Aaron Lun (12:59:58): > <!channel>To get people motivated on this as they come back from hols; I’m thinking that this can be a short F1000Research paper; aiming to submit at the middle of Feb, depending on how much progress we make.

2018-01-04

Charlotte Soneson (08:22:38): > Sounds reasonable to me. Would it be worth having a quick call when everyone is back to plan/split the remaining work, or is Slack enough?

Aaron Lun (08:56:29): > Yes, a quick Skype would be useful.

2018-01-05

Aaron Lun (12:44:25): > Are we all back at work yet?

Federico Marini (15:36:55): > Not yet. (Nicely) lost in snow in the swiss mountains, I’ll be back on Jan 9th

2018-01-06

Aaron Lun (14:27:19): > Okay, what about@Kevin Rue-Albrecht?

Aaron Lun (14:27:30): > I’m thinking of a skype on the 9th.

Kevin Rue-Albrecht (15:45:11): > Hi all, > Yes I am back. Sorry I didn’t open Slack yet (yay! for email notifications). > Happy to Skype to discuss and coordinate. However I’m at a Symposium in town all Tuesday 9th. > If that’s still the best day for everyone, I could still sneak out to take the call with you guys.

2018-01-07

Charlotte Soneson (04:54:44): > As for me, we can do another day than the 9th. I have some meetings planned, but there is at least some time free each day the coming week.

Aaron Lun (06:54:41): > Well, that’s good, because on reflection, I also might have a meeting on the 9th as well. What about… the 10th?

Kevin Rue-Albrecht (07:05:00): > Can we do late afternoon on the 10th? (≥3pm UK time) > I have two meetings of uncertain duration earlier that day (manuscript editing and lab meeting). > Alternatively, 11:30-12:30 (UK time) could work for a sort of lunch call.

Aaron Lun (07:11:14): > Fine with me.

Federico Marini (07:12:19): > 10th is fine also for me. both slots are good

Kevin Rue-Albrecht (07:14:07): > late afternoon could turn into hackathon…:smirk:

Federico Marini (07:15:05): > oh well. in that case it is dangerous:smile:

Charlotte Soneson (08:05:10): > Lunchtime on the 10th doesn’t work for me, but 4pm Swiss time is fine (until ~4:50 when I have to start my commute home:slightly_smiling_face:)

2018-01-08

Aaron Lun (09:46:00): > what’s the time shift with UK? I guess 4 pm there is 3pm here?

Charlotte Soneson (09:59:07): > I think so, that’s how I derived 4pm (since Kevin was available after 3pm UK time).

Aaron Lun (09:59:35): > Okay, 3pm Wednesday UK time works for me.

Kevin Rue-Albrecht (12:43:49): > Any thoughts whether reordering the panels while retaining the widget states is possible at all in the current setting? > I’m thinking about a multiple selection widget where the user can reorder the index of the current panels, and then click a button« go! »

Aaron Lun (12:50:51): > Not sure what you mean - I mean, you can already reorder the panels, and the states should mostly be retained.

Aaron Lun (12:51:23): > <!channel>And is everyone good for 3 pm UK? I don’t have Bluejeans so I can only hope that Skype can handle a four-way call.

Charlotte Soneson (13:02:17): > 3pm UK is fine with me. I’ve done more than 4-way Skype recently, should be fine.

Kevin Rue-Albrecht (13:06:40): > You can reorder them ? It must be a simple thing I haven’t spotted yet then

Aaron Lun (13:11:52): > Yep - that’s what the up/down buttons on the left should be for.

Kevin Rue-Albrecht (13:12:13): > Argh:expressionless:

Kevin Rue-Albrecht (14:09:16): > sorry, i just reopened the app now and finally paid proper attention to the left side panel, beyond the orange ‘remove’ button.

2018-01-09

Federico Marini (04:42:16): > 3pm UK time (a.k.a. 4pm Mainz time) is perfect. Skype is also ok!

2018-01-10

Federico Marini (08:41:38): > Hi everyone, in preparation to the conference call, my username in skype is fede.maro

Charlotte Soneson (08:42:04): > Mine is lottlotta

Aaron Lun (09:17:02): > aaronlun110

Federico Marini (09:45:32): > got the two of you

Kevin Rue-Albrecht (09:45:43): > kal.sunrider

Federico Marini (09:45:45): > only kevin is missing - but I see he’s typing

Federico Marini (09:45:54): > speaking of the devil:slightly_smiling_face:

Kevin Rue-Albrecht (09:46:00): > just got out of a meeting with PI ^^

Aaron Lun (09:50:31): > give me 10 minutes, still banging my head on the wall about something.

Federico Marini (11:00:16): > I should register the trademark for the orchestra plot

Federico Marini (11:00:27): > I see many coming in the next future

Federico Marini (11:00:31): > :slightly_smiling_face:

Federico Marini (11:01:01): > Anyway, as we just said, let’s keep a thread pinned with potentially relevant links/resources for everyone

Federico Marini (11:01:15): > Relevant resources/links here:

Federico Marini (11:01:26): > @Federico Marini pinned a message to this channel.

Federico Marini (11:02:22) (in thread): > https://rstudio.github.io/shinytest/articles/shinytest.html-> unit testing in shiny

2018-01-11

Federico Marini (05:45:57): > So, I am putting together something in thetrack_reprobranch. For now I have a placeholder with the readout of the current active plots, which works (thanks to the nice infrastructure,@Aaron Lun). > More work will follow to actually grab the correct code. > As of now, a proof of principle that you can copy the code is also there. I think it should work on any system (I mainly have macs only, so maybe Aaron can have a quick run and just click, and then ctrl-V somewhere else?)

Federico Marini (05:47:39): > And for the time being, a temporary patch on the up/down/trash buttons would look like empty-text buttons, close to each other instead of vertically aligned

Federico Marini (05:48:23): > maybe if we change the background we do not have to go down the rabbit hole of javascript or whatever other option?

Federico Marini (05:58:39): > p.s. nice to see travisCI machines again running for us:slightly_smiling_face:

Aaron Lun (11:02:35): > I’ll have a look at this tomorrow or the weekend, currently in another debugging battle.

2018-01-12

Aaron Lun (06:52:20) (in thread): > It works but it requiresxclipas a system install, which is not a great idea. Instead of copying to clipboard, can we do something like open a new tab or browser containing all the text?

Aaron Lun (06:56:17) (in thread): > A couple of other suggestions; usepObjectsrather thanrObjects, as the former is not reactive (which is more appropriate for holding code chunks).

Aaron Lun (06:57:21) (in thread): > I wonder whether we can obtain the call to create a ggplot object from the ggplot object itself? This would make life much more convenient.

Federico Marini (08:12:20) (in thread): > About xclip as a requirement: we can have the fallback to open a popup or anything similar where text is included and can be copied. I liked the idea of least number of clicks/actions to get the code

Federico Marini (08:13:36) (in thread): > I do not know whether ggplot objects store the call. Maybe@Kevin Rue-Albrechtand@Charlotte Sonesonknow more?

Charlotte Soneson (08:14:53) (in thread): > I don’t think they store the call (at least they didn’t before). There is a lot of information that perhaps can be used to recreate it (facetting, colors, data etc is all there), but I don’t know if this is more complicated than just regenerating it from the code we (will) write ourselves in the app

Federico Marini (08:17:55) (in thread): > Probably from the scratch will be anyway not so much more complex

Charlotte Soneson (08:19:21) (in thread): > Agree. I think we discussed to have the plotting code in functions, in that case it should just be to extract that code (otherwise we must remember to change the exported code if we change the code internally)

Federico Marini (08:25:05) (in thread): > I’ll start with the aim of getting a working version, then we can refine it with code/functions - although we probably all agree that 3 functions will just be more elegant as wrappers?

Charlotte Soneson (08:27:36) (in thread): > What about trying this:https://github.com/jonocarroll/ggghost - Attachment (GitHub): jonocarroll/ggghost > ggghost - :ghost: Capture the spirit of your ggplot call

Federico Marini (08:31:19) (in thread): > I see it is on cran already

Federico Marini (08:31:50) (in thread): > Ok, I’ll keep it in mind

Federico Marini (08:32:45) (in thread): > De facto we just need something that captures the input$ objects, passes them cleverly as parameters of the functions, and that “would be it”, with a nice oversimplification:slightly_smiling_face:

Aaron Lun (08:41:55): > I’m dealing with the colouring gene text box right now, no one touchdynamicUI.Rorconstants.R.

Kevin Rue-Albrecht (08:42:35) (in thread): > I agree with Charlotte: ggplot stores the data and the aesthetics information, but not the call per se

Charlotte Soneson (09:10:48) (in thread): > Perhaps another option would be to generate the plotting code in the plotting function as a string ("ggplot(df, aes(x = x, y = y)) + geom_point()"), and then return the string as well aseval(parse())the string to get the ggplot object?

Aaron Lun (09:11:21) (in thread): > Yes, that would have been my first thought.

Kevin Rue-Albrecht (09:12:19): > are you talking just UI interface, or behaviour as well? I just spotted a crash situation that I’ll add to the issues:

Kevin Rue-Albrecht (09:13:05): > gene expression plot crashes if coloured by gene expression:ENS... not found in colnames(colData(x))

Kevin Rue-Albrecht (09:14:06): > I think that falls within my ggplot updates though, so don’t worry about it if you were not thinking about it anyway

Charlotte Soneson (09:15:39) (in thread): > So maybe that’s the easiest then: each plot is generated by a function that takes the SingleCellExperiment object and the relevant input$ objects as arguments, and returns a string that is evaluated to generate the plot in the app?

Aaron Lun (09:15:49): > Waiting for the CI for a merge, otherwise I am done. Colouring behaviour is unstable for all plots except the reduced dimension ones, becausescaterwouldn’t play nice.

Kevin Rue-Albrecht (09:17:07) (in thread): > I thought exactly the same; i just never did it before and hope that the evaluation won’t cause problems with theaes(...)part. > Although we could always useaes_stringin that case

Charlotte Soneson (09:18:24) (in thread): > The code above seems to evaluate correctly in a small example

Kevin Rue-Albrecht (09:19:34): > got it - hopefully that won’t be a problem once I replace the scater plotting functions with local ggplot calls

Kevin Rue-Albrecht (09:22:23) (in thread): > oh right, yep, i got it to run too, nice!

Aaron Lun (09:37:51): > Done on my end, knock yourselves out.

Aaron Lun (09:38:34) (in thread): > I would suggest putting the [code for creating the final output string on the clipboard] into a new file, to avoid cluttering upiSEE.R.

Kevin Rue-Albrecht (09:45:08) (in thread): > Makes sense. I was looking atplotting.Ralready.

Federico Marini (09:46:32) (in thread): > usingcodetrack.Rfor this:wink:

Kevin Rue-Albrecht (09:51:06) (in thread): > Just looking at branches now reminds me that we should all delete the branches after merging them.

Aaron Lun (09:51:32) (in thread): > Yes, yes we should.

Aaron Lun (09:51:55) (in thread): > How about everyone take care of their own branches, so we don’t delete stuff that others might have work on?

Aaron Lun (09:55:05) (in thread): > Just killed a whole bunch. Happily git tells you which branches are not yet merged to the master, so just remember to not push the deletions for the unmerged ones.

Federico Marini (09:55:48) (in thread): > Seems we were still good boys/gals, we did not make that much of a mess

Federico Marini (09:55:50) (in thread): > :stuck_out_tongue:

Aaron Lun (09:56:12) (in thread): > Just remember to keep your active branches merged with master.

Federico Marini (10:15:44): > So, on my side: > I got a way to capture all parameters, which are now printed out as a debugging text box up on the top. I’ll put some thoughts on how to generate the code

Federico Marini (10:16:00): > One possibility is that the plotting functions come wrapped in something like this:

Federico Marini (10:16:02): > https://github.com/gammarama/intRo/blob/ce769b254a3fc1be3f4827bfa0155ad89d4b4e9d/global.R#L30-L40 - Attachment (GitHub): gammarama/intRo > intRo - Shiny-based statistics learning application

Federico Marini (10:16:15): > …or similar

Federico Marini (10:16:53): > (I actually likedggghost, but I can also think the lesser deps, the better)

Federico Marini (10:20:07): > In a similar fashion to extract the params, we can do the same with params & calls, and then we can decorate the code a little - thinking of##### some comments to improve readability

Federico Marini (10:26:35): > now pushed totrack_repro, which might be a little out of sync with themasternow after the gene selection

Federico Marini (10:36:20): > Build fortrack_reprois passing. If you want to give it a run, please go ahead:wink:

Federico Marini (10:37:10): > I did not merge yet on master, I am probably a little KO for now for not risking dumb mistakes

Federico Marini (10:39:10): > … and as of now the text box is quite cluttering the UI - excuse me for this, but it was to have all params under control at once

Federico Marini (10:51:16): > @Kevin Rue-Albrechtand@Charlotte Sonesona.k.a. ggplot-team: > as of now I am tracking only the parameters taken out of the inputs, each according to each plot type. This does not include the latest changes that@Aaron Lunintroduced for the gene text box, but it should be no problem to accommodate these at the end. > Just giving you a heads up if it helps you to design accordingly the plotting functions

Aaron Lun (11:34:31): > master merged back into track_repro.

Aaron Lun (11:45:17): > Having stared at the code tracking for a while, I have a few suggestions: > > - Move the button to the side bar, to avoid taking up plotting space. > - Generally, I don’t think it’s a good idea to have the code chunks on the same page as the plots, this would get unwieldy very quickly when you start having more than 5-6 plots. > - Putting the code chunk into a Shiny tab is the other option. I prefer opening a new actual browser tab, though, as this will avoid cluttering the plotting space.

Federico Marini (13:59:46) (in thread): > -> The button will go to the side bar, good point. > -> As of now I just put a text box to have at once an overview of whatever changes I did, and live see the params change > > For the final version, I was thinking of one of the following (or a mix): > - popup or similar (modal from shinyBS?) > - shinyAce/text box editor in another tab > - plus as a bonus (viaEnhance?) the commodity to get the code copied to clipboard

Federico Marini (14:00:11) (in thread): > BTW, thank you for merging. I’ll edit the names of the fields then

Kevin Rue-Albrecht (14:17:16) (in thread): > I think it should have beengit rebase master track_reproinstead, but maybe it works that way too

Federico Marini (14:24:46) (in thread): > I’m far from being a git pro, so I’m just glad it worked:smile:

Kevin Rue-Albrecht (14:31:02) (in thread): > the way I remind myself is that it makes more sense to “rebase all the side branches onto the master branch” than to “merge the master branch into all the side branches” - i’m not sure what happens when you merge multiple side branches back into the master branch, after each of the side branch has received a merge from the master (argh that’s a pain to type)

Federico Marini (15:22:58): > For the gg-team, as well for Aaron in case he’s curious

Federico Marini (15:23:56): > @Federico Mariniuploaded a file:pop_modal.png - File (PNG): pop_modal.png

Federico Marini (15:24:31): > Here’s a very raw concept realization of the code-capturing popup (bsModal)

Federico Marini (15:24:58): > not perfect yet for the code generation, but still:slightly_smiling_face:

Federico Marini (15:25:48): > I’m just wondering if it makes sense then for you to develop functions that getexactlythe param values as we have them in the UI

Federico Marini (15:26:06): > probably the answer is yes, but I’m open to alternatives

Federico Marini (16:21:22): > So, my part up to the function call is up and running in thetrack_reprobranch

Federico Marini (16:24:09): > now relying only on thebsModalcall, and the user can copy and paste it manually

Federico Marini (16:24:46): > (known problem, minor yet: there is an extra NULL coming at the end of the code, I can’t track it down)

2018-01-13

Aaron Lun (08:08:17) (in thread): > I’ve had bad experiences with rebase, so I don’t touch it anymore.

Aaron Lun (10:35:06): > Pretty cute.

Kevin Rue-Albrecht (10:38:41): > I think it’s the return value of theprintfunction

Kevin Rue-Albrecht (10:39:24): > so ifprintis the last command in a function, that function will returnNULL

Kevin Rue-Albrecht (10:41:46): > it’s the sort of annoying issues I used to face withshowmethods

Kevin Rue-Albrecht (11:59:36): > Hi all, > I’ve just pushed an update on branchggplot_coldata. > It builds Charlotte’s update this morning (branchggplot).@Aaron Lun, I offered a fix to plot colData without a X-axis (that scater doesn’t like). Basically, in the absence of X variable, I rank samples by their Y value

Kevin Rue-Albrecht (12:00:45): > I’ll get started on generating the associated ‘tracking script’, but if anyone has feedback, I’ll take it on board

Aaron Lun (12:01:30): > Currently struggling with some funny behaviour with shinyBS, will upload my changes soon.

Kevin Rue-Albrecht (12:02:23): > @Kevin Rue-Albrechtuploaded a file:ggplot_coldata update - File (PNG): ggplot_coldata update

Kevin Rue-Albrecht (12:03:36): > (just realised it’s much easier to share a screenshot than to ask you to checkout+build+launch the app)

Kevin Rue-Albrecht (12:05:18): > note that I thought about offering a toggle “rank decreasing/increasing”, but once again I think I was trying to go above and beyond on something that users could fiddle from the code we give them

Aaron Lun (12:46:45): > Figured it out;conditionalPaneldoes not play nice with the shinyBS panels.

Kevin Rue-Albrecht (12:56:41): > ouch, well done, i only ever played with the former

Kevin Rue-Albrecht (12:57:59): > quick one: what is the purpose of returninglist(xy=plot.data, plot=out.plot)for dimred? something to do with the brushing?

Kevin Rue-Albrecht (12:59:53): > because i’ve got the data, the plot, and the command for the coldata plot, so i’m looking at the reddim for a reference return value

Aaron Lun (13:13:01): > xywas for selecting the brushed points in other plots. You could also do that with the ggplot object, as long as something about the coordinates gets saved into memory so that it can be accessed from plots linked to it.

Kevin Rue-Albrecht (13:16:45): > ok thanks. so i’ll do the same as Charlotte did this morning, and returnlist(xy = plot.data, cmd = cmd, plot = eval(parse(text = cmd)))instead of only theggplotobject as.make_colDataPlotcurrently does

Kevin Rue-Albrecht (13:17:51): > this way I can do the downstream work iniSEE.Rto catch up the plot from the appropriate list item, while@Federico Marinican grab the command from the other item

Aaron Lun (13:21:35): > Well, we shouldn’t need thexyanymore if we store the ggplot object in the memory.

Kevin Rue-Albrecht (13:23:06): > argh. got you now. didn’t pay enough attention to your “wasfor selecting”

Aaron Lun (13:27:46): > Ah shit this shinyBS crap is a nightmare.

Aaron Lun (13:28:52): > I’m going to sleep on it. Meanwhile, I’ve merged the UI updates.

Kevin Rue-Albrecht (13:30:16): > ok cool, i’m about to push my final update and offer a merge into theggplotbranch where Charlotte is working

2018-01-14

Charlotte Soneson (10:45:04): > I just pushed some more updates to theggplotbranch, fixing theggplotcode of.make_geneExprPlot(I ended up reusing some of the code fromscater). There are still plenty of things to fix, but if we can agree that this structure works for everyone those can be fixed later. What we have currently are functions that return a list of values, including the command to generate the plot from theseobject (cmd), and the plot itself (plot). I have tried to evaluate as little of the code as possible inside the function (until the return step) to avoid having to duplicate code. Thus, the returned code should reliably generate exactly the plot that is shown.

Kevin Rue-Albrecht (10:56:04): > ah right, I meant to point out that we were running some code twice: once explicitely, the second time when weeval(parse(cmd)))

Kevin Rue-Albrecht (11:03:04): > I still need to clean it up in my own part (coldataPlot), but for instance in.make_redDimPlot, I think all the code that preparesred.dimcan be removed, considering that it will all be done when the command gets evaluated. Follow me?

Charlotte Soneson (11:03:48): > Yes. I haven’t cleaned up.make_redDimPlotyet, so there are some things that are run multiple times. in.make_geneExprPlot, I tried to minimize it.

Kevin Rue-Albrecht (11:07:31): > ok, no worries; i just realised it myself when i was printing one command while executing a slightly different one

Kevin Rue-Albrecht (11:23:25): > Actually, i stand corrected: it’s still necessary to run the commands separately from the evaluation, to generate thexyelement. > Nevertheless, as Aaron pointed out recently, given that the coordinates are stored in theggplotobject, we may remove all things relating to thexyslot at some point

Kevin Rue-Albrecht (11:24:24): > Just testing out the updated code, I get the following error:Warning: Error in .make_geneExprPlot: object 'evals.long' not found

Charlotte Soneson (11:25:49): > Yes, that’s one of the problems. It occurs in the beginning, before everything is loaded and processed. Then it disappears (at least for me). So there needs to be a check somewhere that all the necessary objects exist

Kevin Rue-Albrecht (11:33:15): > yes it settles as well for me after a couple of failed attempts; it’s just weird that it happens at all; you’re right, there must be a failsafe missing somewhere

Aaron Lun (11:56:02): > Note to all: I have “fixed” the collapsible issue I mentioned yesterday, by copying theshinyBS.jsscript into ourinst/wwwand fixing a few bugs (https://github.com/ebailey78/shinyBS/issues/38). This ensures that the conditional panels within each collapsible panel do not interfere with the open/closed status of the collapsible panel. However, it means that if you or other packages runlibrary(shinyBS)at any point, the original buggy javascript file will overwrite the fixed one in our package, and the bug will resurface. - Attachment (GitHub): Bug: ConditionalPanel within a CollapsePanel confuses the collapsePanel · Issue #38 · ebailey78/shinyBS > I have a nested conditionalPanel within a bsCollapse. When the conditionalPanel hits a FALSE condition and elements are hidden, the value of the bsCollapsePanel does not get returned properly. That…

Aaron Lun (11:58:57): > The only sustainable solutions are for theshinyBSmaintainer to actually do his damn job and fix the bugs (unlikely); or for us to implement our own collapsible box. The latter is not a bad idea but it would require some decent skill in getting Javascript and Shiny to play nice; I had a go and couldn’t even get pastsyntax error: missing ";".

Aaron Lun (12:05:01): > On a precautionary note, be careful with putting too many things inrObjects; especially modification ofactive_plots, which will trigger re-rendering of the entire UI. Most things can go intopObjects. I’ve noticed that the rendering has recently become slower, though it’s not yet clear why.

Kevin Rue-Albrecht (12:05:20): > any chance we can swing a PR to the shinyBS package? what’s the CRAN policy on unresponsive maintainers?

Aaron Lun (12:06:04) (in thread): > There alreadyisa PR for this issue. There are 8 PRs in total and 56 issues. So… probably not much chance of getting action here.

Kevin Rue-Albrecht (12:06:16) (in thread): > argh - ok

Aaron Lun (12:06:49) (in thread): > CRAN does have a decent policy on unresponsive maintainers - they’ll orphan the package and allow other interested parties to take over. But this does depend on having someone with the skill to take over.

Kevin Rue-Albrecht (12:07:04) (in thread): > oh right, I misread your GitHub link; thought it was your own PR into iSEE

Kevin Rue-Albrecht (12:09:39): > speaking of precautionary note: i notice there’ll be a bit of code conflict merging theggplotbranch back intomaster, as RStudio did the same automated cleanup of trailings spaces in both branches. Simple but a bit tedious to deal with this. Anyone knows where those trailing spaces came from, to avoid the issue in the future if possible?

Aaron Lun (12:10:03): > Probably me, I’m not using Rstudio.

Aaron Lun (12:10:33): > Actually, I’m not sure.

Kevin Rue-Albrecht (12:10:50): > oh right - out of curiosity, what are you using?

Aaron Lun (12:10:52): > vim

2018-01-15

Kevin Rue-Albrecht (06:07:32): > Hi all, I just added some validation code on theggplotbranch to avoid issues when the gene text box contains an invalid gene identifier (either empty default value or gene name not in data). > It seems to catch all errors now (I can’t make it crash)

Kevin Rue-Albrecht (06:10:12): > I need to do some other stuff for a while, but I’d like to apply the fix to the dimred plot as well later today (the dimred reverts to colorless in case of invalid input)

Aaron Lun (06:20:52): > To all - I have finallysolvedthe collapsible box problem, by implementing our own internalcollapseBoxfunction with its own javascript backend. In this manner, we eliminate any dependence onshinyBS, which avoids many of its associated problems.@Federico MariniI suggest usingshiny’smodalDialograther thanshinyBS::bsModal.

Aaron Lun (06:24:11): > @Kevin Rue-AlbrechtI suggest regularly mergingmasterwithggplot(not the other way around) to keep the merge conflicts manageable.

Kevin Rue-Albrecht (06:25:14): > I get you. Smaller conflicts to manage if dealt with regularly

Aaron Lun (06:25:35): > I’ll deal with it for now - give me a few minutes.

Kevin Rue-Albrecht (06:26:21): > thanks

Kevin Rue-Albrecht (06:26:52): > I’m knee-deep in contributing a section to a manuscript… so you have time!

Federico Marini (07:32:48) (in thread): > I’ll look into it

Kevin Rue-Albrecht (08:00:10): > ehm.. just tested the new app: seems like yourmergehas cancelled out some of my recent contribution toggplot: the validation message code has disappeared again

Kevin Rue-Albrecht (08:04:09): > think I found it, it’s the ‘merge aaron_edits into ggplot’ that deleted that part

Kevin Rue-Albrecht (08:07:20): > @Charlotte Soneson: can you check your edits to dimred and geneExp plots? I think they were reverted there too

Aaron Lun (08:10:18): > Thats odd, I was pretty careful about that.

Aaron Lun (08:10:35): > OnlyiSEE.Rwould have been affected.

Kevin Rue-Albrecht (08:11:35): > indeed, i think it’s onlyiSEE.R

Kevin Rue-Albrecht (08:11:56): > as far as I can see; the plot appearance has remained updated

Charlotte Soneson (08:12:07): > From what I can see, the dimred and geneExp plot code looks like what I have locally

Kevin Rue-Albrecht (08:14:16): > hmm.. from my perspective, my changes toiSEE.Rfrom this commit have disappeared:https://github.com/csoneson/iSEE/commit/e2d9f530efb50ef4590c602a37b1767f700b0bd4 - Attachment (GitHub): colData plot: show validation error when coloring gene text field is … · csoneson/iSEE@e2d9f53 > …not a rownames(se); do not include an xy element in the return list

Kevin Rue-Albrecht (08:14:36): > (check theifblock after# Do not plot if text field is not a valid rownames(se))

Aaron Lun (08:14:50): > I think I see it.

Kevin Rue-Albrecht (08:14:59): > i’m on it though

Aaron Lun (08:15:11): > okay, sorry. The underlying changes to the shiny machinery were pretty intense. You’ll need to put backmessage(p.out$cmd)in the Gene expression plots as well.

Kevin Rue-Albrecht (08:15:14): > just wanted to point out in case other things disappeared

Aaron Lun (08:17:52): > Though while we’re on this point, it may be more friendly to just refuse to plot the colour in case of an invalid row names, while still plotting the points (this is how reduced dim currently behaves, from my last check).

Aaron Lun (08:19:28): > And then have a littleProgresspanel open up showing the error.

Kevin Rue-Albrecht (08:20:06): > actually, I saw the difference, and I was going to bring that up. > I was also tempted by being friendly to the user, but i thought it more efficient and pedagogic to not plot if the gene field is invalid

Aaron Lun (08:21:06): > Well, as long as the policy is consistent across all plots.

Kevin Rue-Albrecht (08:23:27): > i’ve just pushed my validation code back to ggplot branch

Aaron Lun (08:23:30): > Thanks

Aaron Lun (08:24:25): > I think the Gene expression plots need the same treatment.

Kevin Rue-Albrecht (08:24:39): > didn’t see where to add themessage(p.out$cmd)back though; there already ismessage(cmd)inplotting.R

Aaron Lun (08:25:02): > From the section with the gene expression plots, I think.

Aaron Lun (08:25:37): > On the plus side, this could have been a lot worse if everything had been iniSEE.R.

Kevin Rue-Albrecht (08:29:33): > Anyway, i’m just happy to see my part work again the way I intended it. > Happy to apply the same treatment to the dimred and geneExprs plots later, if no one gets to it before I do.

Kevin Rue-Albrecht (08:32:10): > ah - note to self: I forgot to validate the gene selection when it comes from the gene table: if you unselect the gene, both colData and geneExprs plots show anError: object 'Covariate' not found

Kevin Rue-Albrecht (08:51:32): > ok - problem solved for the colData plot now: both for the free text field and the gene table selection

Aaron Lun (09:03:33): > cool

Federico Marini (10:00:17) (in thread): > Ciao ciaoshinyBS, welcomemodalDialog- done

Charlotte Soneson (10:29:38): > I made some small fixes to theggplotbranch and put back themessage(p.out$cmd)

Kevin Rue-Albrecht (10:41:02): > Nice. If that’s okay with you, I’ll add my little magic to validate the gene name input in the dimred and geneexpr plots

Charlotte Soneson (10:41:38): > Yes, please!

Kevin Rue-Albrecht (10:48:08): > btw, if i read the diff correctly, i would say the merge conflicts come from the fact thatvim(or one of our code editors) probably keeps the level of indentation for empty lines, while RStudio (at least, mine) trims all the spaces from those lines. > I’ll see if I can fix the autocorrect on my side, as I also have issues with RStudio using 4-space indents, even though I set them to 2-space in the project settings. argh

Kevin Rue-Albrecht (11:05:31): > validation message in place for dimred plot; i’ll look at the geneExprPlot later, as there are a few different gene inputs to handle

Aaron Lun (12:19:37) (in thread): > Sweet.

Aaron Lun (12:20:38) (in thread): > I wouldn’t stress out too much about it, as long as we continually merge withmaster, we should avoid/manage merge conflicts.

Kevin Rue-Albrecht (12:59:56): > i’m about to push the validation code for all three plots in the next 5-10 min. > to limit risk of conflicts, i won’t touch constants now, but i think some new ones could be set up (e.g.modeand thelabels of radio buttons indynamicUI.R)

Kevin Rue-Albrecht (13:00:29): > that way, validation message could be made even friendlier

Aaron Lun (13:04:01): > What kind of constants do you need?

Kevin Rue-Albrecht (13:10:11): > let me know how you find the validation messages (when you unselect gene names), but I was thinking silly things like “Y-Axis”, “X-Axis”, “Color by” in addition to the data.frame friendly “XAxis”

Kevin Rue-Albrecht (13:10:50): > basically constants for the labels that the user sees in the UI, in addition to the field names that we use in tables

Kevin Rue-Albrecht (13:11:23): > oops.. one more commit coming your way: forgot to removeprintdebug statements

Aaron Lun (13:14:11): > Ah. Well, you can do what you like, just follow the naming scheme inconstants.Rand stick"Title"to reflect the fact that it’s a user-visible name.

Kevin Rue-Albrecht (13:14:12): > Actually forget about themodething, that was still a memory of my learning curve to understand the encoding of memory column names

Kevin Rue-Albrecht (14:31:52): > @Charlotte Soneson: anything else you wanted to add toggplotbranch? or shall i merge it back tomaster? > I can’t spot any obvious bug right now.

Charlotte Soneson (14:38:27): > Not directly related to the ggplot conversion. There are still things in the gene expression plot that need fixing, specifically in the plotting parameters, I guess it should be possible to choose genes bytextInput, and to choose different genes for the x and y axes (currently they are both linked to the gene table).

Kevin Rue-Albrecht (14:40:32): > true. i noticed the absence of the genetextInputfor that last plot > for the ‘different XY genes’ feature, i can already do it by linking each axis to a different gene table

Charlotte Soneson (14:41:17): > yes, true, but that’s neither very convenient or intuitive:slightly_smiling_face:

Kevin Rue-Albrecht (14:41:40): > yep - took me a minute myself to think it out

Kevin Rue-Albrecht (14:44:28): > which reminds me, i meant to say, if you want to test the latest features efficiently: when opening the app, add 2 more gene tables (3 total). > then you can color dimred with the first one, color colData with the second one, and in the geneExprs plot the first one vs the second one and color by the third one

Kevin Rue-Albrecht (14:45:00): > then you can have fun unselecting genes from the individual tables to see the validation messages in action

Kevin Rue-Albrecht (14:46:50): > which reminds me (chapter 2), that incidentally those input validations have solved the issue of error messages related to the geneExprsPlot

Kevin Rue-Albrecht (14:47:31): > (a lot less fallback code to write, if we train users correctly:wink:)

Charlotte Soneson (14:48:48): > Nice!

Kevin Rue-Albrecht (16:26:16): > Alright, i’m resetting the ‘code conflict clock’ by mergingggplotback intomaster. > I’ve triple-tested all plots, and can’t make them crash (Federico, feel free to give the app to the kids this weekend!)

Federico Marini (17:26:46): > Hehe. Better not, at least the youngest one has a talent in finding out new functions of the trackpad

Federico Marini (17:26:48): > :smile:

2018-01-16

Federico Marini (06:35:09): > <!channel>I did a small implementation of the tour in theminitourbranch

Kevin Rue-Albrecht (06:35:20): > cool, looking forwrd

Federico Marini (06:35:26): > Did we removescaterfrom theDESCRIPTION?

Kevin Rue-Albrecht (06:35:31): > yep i did

Federico Marini (06:35:36): > because we still need it for the examples

Federico Marini (06:35:51): > we explicitly calllibrary(scater)

Federico Marini (06:35:59): > and I got an error while checking locally

Federico Marini (06:36:35): > so I re-added that - or are there better policies for pkgs only used in examples?

Kevin Rue-Albrecht (06:36:38): > ok no worries, i guess it can go back under suggests then? our objective was only to remove the dependency on its plotting functions

Kevin Rue-Albrecht (06:37:16): > off the top of my head, i can’t remember under which section packages needed in example should go

Kevin Rue-Albrecht (06:37:27): > i think it’s suggests, like for unit testing

Federico Marini (06:37:49): > we probably just need normalize and runPCA to be “explicitly” imported - but this does not matter that much, since we load the whole lib for the examples

Federico Marini (06:37:56): > I’ll check too if you want

Kevin Rue-Albrecht (06:39:02): > keep in mind that the example code is only explicitely run on the nighty build machine; user only run that code if they wish to see an example usage. Hence the more relaxed dependency in Suggests, as far as I remember

Federico Marini (06:39:40): > true, but if the R CMD check is not passed (as it does locally for me) we have a problem:smile:

Federico Marini (06:39:56): > so in this scope, it is strange that the CI machines did not raise any issue?

Kevin Rue-Albrecht (06:41:09): > I find the discrepancy strange indeed, but I would have expected the check to pass > hang on, i’ll runcheckon my machine too

Federico Marini (06:41:55): > ok

Federico Marini (06:42:00): > I’m out for lunch

Federico Marini (06:42:05): > I’ll catch up later

Kevin Rue-Albrecht (06:42:19): > ahhh i think i know the issue

Kevin Rue-Albrecht (06:42:58): > i’ve removedscaterfrom theDESCRIPTION, but I haven’t removed the import instructions fromNAMESPACE

Federico Marini (06:43:24): > the import instructions go away with roxygen

Federico Marini (06:43:27): > if you use it

Federico Marini (06:43:34): > the description stays kind of untouched

Federico Marini (06:43:36): > well

Federico Marini (06:43:46): > let’s see what is best for examples

Federico Marini (06:44:05): > iSEEyou guys later:smile:

Kevin Rue-Albrecht (06:44:47): > “The ‘Suggests’ field uses the same syntax as ‘Depends’ and lists packages that are not necessarily needed. This includes packages used only in examples, tests or vignettes (see Writing package vignettes),”

Kevin Rue-Albrecht (06:45:22): > from the “Writing R Extensions” guidelines

Kevin Rue-Albrecht (06:48:50): > I found the place causing the bug: iniSEE.R, there was theimportFrom('scater' ,...)statement that I forgot to remove. > I’ve only started using roxygen for iSEE, still getting into the habit

Kevin Rue-Albrecht (07:20:23): > i’ve pushed an update that solves thescaterdependency issue

Federico Marini (07:28:27): > perfect

Federico Marini (07:28:37): > thanks for finding & checking

Kevin Rue-Albrecht (07:29:05): > you should probably merge master into your branch, and let me know if if it still checks

Federico Marini (07:29:35): > I’ll look it now

Kevin Rue-Albrecht (08:03:34): > really nice intro feature!

Federico Marini (08:07:07): > Thank you. Could be useful for a first round for people who want to dive in the capabilities

Kevin Rue-Albrecht (09:06:59): > exactly - a couple of collaborators from the experimental side have already shown interest

Kevin Rue-Albrecht (09:08:43): > particularly form a mix of frustration with cLoupe, and the wish to explore the data more interactively than a cycle of emails with their bioinformatician (in one case, me:sweat_smile:)

Kevin Rue-Albrecht (09:15:04): > i think it’s going to be a really helpful tool to both explore data sets and finalise manuscripts: checking out metrics from QC to gene expression estimates and picking representative figures (which gets me thinking about the selling points to keep for the iSEE manuscript)

Federico Marini (09:16:35): > Oh well. “Making life easier” is the best summary

Federico Marini (09:17:36): > but to formalize it, and also shamelessly self-citing my previous package, it is all about combining the ease of interactivity with the technical reproducibility what makes it widely adoptable

Federico Marini (09:17:40): > :smile:

Kevin Rue-Albrecht (09:17:41): > “Making ‘Unbiased Single-cell Analysis’ great again” ?:flag-lr:

Federico Marini (09:18:01): > #MUSAga?

Federico Marini (09:18:20): > trending in 3 … 2 … 1 …

Aaron Lun (09:45:41): > I think I’m late to the battle, but yes,scaterbelongs inSuggests.

Aaron Lun (09:47:46): > HOLY SHIT THIS INTRO STUFF IS AMAZING

Kevin Rue-Albrecht (09:48:11): > buckle up for branchaaron_edits_2:joy:

Aaron Lun (10:47:30): > Some comments/suggestions: > - Syntax highlighting for the code chunks in the modal; is this possible (@Federico Marini)? > - Move the validation inside the plot function, to reduce the conflation with Shiny infrastructure iniSEE.R? > - Why are we still storingxy?brushedPointsshould be able to use the ggplot if that gets stored incoordinates. > - Let me know when you want to start incorporating the brushing; hopefully the examples inredDimshould be clear.

Kevin Rue-Albrecht (10:51:12): > I left thexyin the plots where Charlotte was working (we distributed them between us), to avoid code conflicts. I can take it out now

Aaron Lun (10:51:19): > okay

Aaron Lun (10:52:05): > Note that.make_geneExprPlotseems to have a bunch of unbound variables.

Kevin Rue-Albrecht (10:52:34): > I thought about moving the validation code inside the plotting functions, but I think they don’t work as expected (cause an error instead of catching it) if they’re not in the application itself. I’ll try again locally and let you know

Kevin Rue-Albrecht (10:54:48): > Indeed, i saw the CMD check notes about the unbound variables. Charlotte probably has a better idea than me how those warnings are generated. I can look into it as well, and whoever comes up first with solution can push it online ?

Aaron Lun (10:56:03): > I see now, they get generated indirectly by theeval.

Charlotte Soneson (10:56:07): > I know where they come from, but I couldn’t agree with myself on the best way to solve them:

Charlotte Soneson (10:56:19): > exactly what Aaron just said:slightly_smiling_face:

Charlotte Soneson (10:56:42): > It can be solved by duplicating some code

Charlotte Soneson (10:56:53): > But I don’t know if there is a better idea

Aaron Lun (10:56:55): > Under what conditions doeseval.longbecome NULL?

Kevin Rue-Albrecht (10:57:05): > To be fair, I want to polish the plotting functions: at the moment, in the absence of color scale, my workaround is to replace the ggplot command by a comment ‘# no coloring’, while Charlotte puts a dummylabs()text value, as it doesn’t get shown anyway

Charlotte Soneson (10:57:49): > It was NULL when the app was started, before all the variables were populated. I think it is solved now with Kevin’s checks

Charlotte Soneson (10:58:24): > Sorry, I am a bit unresponsive today and tomorrow, we have our lab retreat:slightly_smiling_face:

Aaron Lun (10:59:48): > Also, rather thanpaste’ing the commands as we go, it may be better to put them into a vector and just dopaste(, collapse='\n')at the end.

Kevin Rue-Albrecht (11:01:39): > exactly , regarding my polishing of the plotting code, I have been thinking about a stashing the commands in a namedlist(names being ‘prep_data’, ‘ggplot_call’, ‘aes’). At the end, I could reorder that list in the proper order and callpaste(unlist(...))

Kevin Rue-Albrecht (11:02:48): > this way, if any command is absent, it won’t be pasted at all in the final command; instead of the current strategy being to put a dummy command

Federico Marini (11:02:51) (in thread): > - Syntax highlighting: maybe if we use an instance of a shinyAce text editor

Aaron Lun (11:02:58): > I would also break up the code with more comments, it’s a big code vomit right now.

Kevin Rue-Albrecht (11:03:25): > do you mean within each plot? or separate the different plots by comments?

Federico Marini (11:03:32) (in thread): > -> I wanted to keep it pretty compact for the first round. It can nevertheless look like a full instance of editor (autocompletion allowed:smile:)

Aaron Lun (11:03:44): > Within and between functions.

Aaron Lun (11:03:56): > Just do something like##################if you want to separte different functions

Aaron Lun (11:04:04): > just like the different categories iniSEE.R

Kevin Rue-Albrecht (11:04:05): > well, don’t forget that the current code vomit in the console is only for our own debug purpose

Aaron Lun (11:04:20): > Oh, no, I meant inplotting.Ritself.

Kevin Rue-Albrecht (11:04:27): > ahhh

Aaron Lun (11:04:39): > Just scanning through the file, it’s hard to read.

Aaron Lun (11:04:49): > Clarity is espeically important given ourevalvoodoo.

Federico Marini (11:04:53) (in thread): > thank the guys from the galaxy team. I saw once how they switched from video tutorial to “codable” help and I wanted that too

Kevin Rue-Albrecht (11:04:58): > yep - i get you

Aaron Lun (11:05:47): > Could you also stash the plotting commands in another field ofpObjects(e.g.,pObjects$code) so@Federico Marinican print them out incodetrack.R?

Aaron Lun (11:06:24) (in thread): > Hm. I was hoping that there would be a javascript library that just does this highlighting automatically.

Federico Marini (11:07:03) (in thread): > (btw I told you you could have liked that when I said “I#ll just make a simple proof of principle “:smile:)

Kevin Rue-Albrecht (11:07:09): > I could. I wasn’t sure where to stash them, so I thought I’d “deliver” them to Federico in the list returned by the plotting function, and he would take it from there. But ifpObjectsis the right place, I’m happy to put it there

Federico Marini (11:07:29) (in thread): > it’s nice to be right:stuck_out_tongue_winking_eye:

Federico Marini (11:07:57) (in thread): > not that I am aware

Federico Marini (11:08:05) (in thread): > I’ll look around a bit

Aaron Lun (11:08:13): > Yes, that would be the best place, as it persists throughout the Shiny app for the codetracker to pull out at an unspecified point in the future; a list would have to be actively passed to the code tracking function.

Federico Marini (11:08:28) (in thread): > but there i am using a simple verbatimTextOutput, so my options might be limited

Aaron Lun (11:08:45) (in thread): > https://cran.r-project.org/package=highlight

Aaron Lun (11:08:51) (in thread): > Seems to give output in HTML?

Federico Marini (11:10:48) (in thread): > I’ll check it

Kevin Rue-Albrecht (11:14:07): > @Kevin Rue-Albrecht pinned a message to this channel.

Kevin Rue-Albrecht (11:22:04): > btw, i’ll be removing branches from github includingggplot, considering that we’ve merged pretty much everything back into master

Aaron Lun (11:26:54): > Yep

Federico Marini (11:31:39) (in thread): > Highlight does not seem to play nice with us - at least in the way I am trying out

Kevin Rue-Albrecht (11:31:53): > ok - i said something stupid before: validation codedoeswork inside plotting functions, even if outside the main application. I would have sworn it didn’t work last time I tried. > I’ll move them now

Federico Marini (11:32:14) (in thread): > (which is a renderUI + htmlOutput)

Aaron Lun (11:34:14): > good.

Kevin Rue-Albrecht (11:37:27): > note that i’ll also clean up the ‘command-building’ aspect as much as possible on the same branch (different commits)

Federico Marini (11:45:47) (in thread): > ok it is not so straightforward as i thought:disappointed:

Aaron Lun (11:50:41): > okay, I’m not doing anything there right now.

Kevin Rue-Albrecht (11:52:50): > actually, you know what, i’ll push the branch now: it already contains the validation code moved out ofiSEE.R. > this way you can safely work iniSEE.Rwhile I only touchplotting.Rto clean up the command-generating code

Aaron Lun (11:56:04): > No worries. I’m really not doing anything iniSEE, I’m struggling withscatercode at the moment.

Kevin Rue-Albrecht (11:59:28): > ok. still, i’ll try to clear your way asap. > I’ll take care of thatxything as well before I push, but then I’m not expecting to touchiSEE.Rfor a while

Federico Marini (12:00:09) (in thread): > the user would anyway copy that out in some syntax-aware IDE - but of course I see the added value of such a nice highlighting

Federico Marini (12:00:52) (in thread): > I’m going to put this on hold for now

Aaron Lun (12:08:36) (in thread): > okay.

Federico Marini (12:08:40) (in thread): > Ok, alternative way - need to have some clues on how to really do it (probably needing some intermediate thing-y): aceEditor, on the bottom of the app (could not have it fit in the modalDialog, and unleash the IDE power)

Federico Marini (12:08:45) (in thread): > looks like this:

Federico Marini (12:09:54): > @Federico Mariniuploaded a file:aceeditor.png - File (PNG): aceeditor.png

Federico Marini (12:10:02) (in thread): > (see channel, I could not share it here)

Federico Marini (12:10:29) (in thread): > @Federico Marinimentioned a file:Screen Shot 2018-01-16 at 18.07.10.png. - File (PNG): aceeditor.png

Aaron Lun (12:11:25) (in thread): > Looks nice. Will that go happily in the modal dialog?

Federico Marini (12:11:48) (in thread): > tried, did not work. will re-try

Federico Marini (12:14:45) (in thread): > didwork

Federico Marini (12:15:00) (in thread): > Still need to check how to get the actualized code

Federico Marini (12:15:18) (in thread): > either via a tmp file or bypassing and giving it directly

Kevin Rue-Albrecht (12:16:52): > cool! so you’re already working on this locally?

Federico Marini (12:17:28): > surprise surprise:slightly_smiling_face:

Kevin Rue-Albrecht (12:17:44): > i’m about to merge the branch that updates 1)validationcode in plotting functions, and 2) don’t returnxy

Federico Marini (12:17:52): > @Federico Mariniuploaded a file:UNLEASH_THE_EDITOR.png - File (PNG): UNLEASH_THE_EDITOR.png

Federico Marini (12:18:06) (in thread): > @Federico Marinimentioned a file:Screen Shot 2018-01-16 at 18.17.04.png. - File (PNG): UNLEASH_THE_EDITOR.png

Federico Marini (12:18:14) (in thread): > something like this?

Kevin Rue-Albrecht (12:18:23): > you’ll soon be able to pick up that code frompObjects

Federico Marini (12:18:39) (in thread): > :victory_dance_emoji, where are you when we need you:

Federico Marini (12:19:33): > :thumbsup:

Federico Marini (12:20:38) (in thread): > I need to clean up a couple of things beforehand and/or do not want to be too rushy

Federico Marini (12:20:48) (in thread): > So I’ll check it later again/clean up

Aaron Lun (12:26:26): > Yeah

Kevin Rue-Albrecht (12:29:36): > tiny little delay: i’m learning to stash stuff intopObjects. Nearly there I believe. > Note that I won’t document the “Command” column ofpObjects$memory$...as one of the ‘parameters’, considering that it is an output rather than an input

Aaron Lun (12:30:23): > Um - I probably woultn’ put it inpObjects$memory.

Aaron Lun (12:30:34): > I would put it in a new list, e.g.,pObjects$commands.

Aaron Lun (12:30:49): > This would be a lot cleaner for everyone.

Kevin Rue-Albrecht (12:30:49): > right, just realised it as I was typing

Aaron Lun (12:31:25): > For even greater ease, turn it into a list of lists, indexed bymode(top layer) andID(second layer).

Kevin Rue-Albrecht (12:31:35): > yep

Aaron Lun (12:31:44): > Thencodetrackonly has to traverserObjects$active_plotsand do some simple indexing.

Kevin Rue-Albrecht (12:32:09): > good news is that I definitely managed to store it. now it’s just about storing itproperly, sorry!:sweat_smile:

Federico Marini (12:32:23): > @Aaron Lunexact, that was basically the long term goal

Federico Marini (12:32:36): > @Kevin Rue-Albrecht: no need to rush:wink:

Federico Marini (12:33:32): > > la gatta frettolosa fa i gattini ciechi

Federico Marini (12:34:01): > kind of follows the > > more haste, less speed

Kevin Rue-Albrecht (12:34:02): > hehehe

Davis McCarthy (12:55:20): > @Davis McCarthy has joined the channel

Davis McCarthy (13:44:05): > Hey all - great to see all this progress. I’m on a loan laptop at the moment, so struggling to get a workable R-dev environment, but will dig into all this ASAP and see if I have any useful suggestions

Kevin Rue-Albrecht (13:50:01): > hi Davis

Kevin Rue-Albrecht (13:50:34): > There is no absolute need for R-devel: I found a hack to get it on collaborator’s R.3.4

Aaron Lun (13:51:03): > Sacrilege

Kevin Rue-Albrecht (13:51:07): > just make it require R≥3.4 in DESCRIPTION

Kevin Rue-Albrecht (13:51:55): > you’ll just have to R CMD INSTALL it, instead of devtools::install_github

Federico Marini (14:20:07): > hi@Davis McCarthy

Federico Marini (14:47:09): > something stalling on travisCI?

Kevin Rue-Albrecht (14:47:21): > yep

Kevin Rue-Albrecht (14:47:32): > i didn’t break it i swear

Kevin Rue-Albrecht (14:47:43): > :stuck_out_tongue:

Kevin Rue-Albrecht (14:47:52): > “We are currently investigating an increased back log for container-based infrastructure”

Federico Marini (14:47:58): > ah ok

Federico Marini (14:48:07): > uh

Federico Marini (14:48:16): > iSEEthe red antenna

Kevin Rue-Albrecht (14:48:18): > i cancelled my build, so yours ‘started’, but it didn’t help

Federico Marini (14:48:37): > i think it is globally stuck

Kevin Rue-Albrecht (14:48:49): > yup. happens

Federico Marini (14:49:48): > Things happen while such services are down, a.k.a. we areforced to work:smile:

Federico Marini (14:49:57): > (well, offline)

Kevin Rue-Albrecht (14:50:49): > $#!+ happens:wink:

Kevin Rue-Albrecht (14:53:20): > btw, i managed to stored the commands inpObjects$commands$[mode], which is finally a list of character vectors. I initialised those with a length matching onto the dimension of the correspondingmemory$[mode]. > This way, you’ll be able to pick the commands of the active plots as he said

Kevin Rue-Albrecht (14:54:39): > (well, to be fair, CI systems being down can also help us pause to chat about developments and plans, if you really miss the online part:wink:)

Federico Marini (15:36:42): > btw, did we agree on the next skype call time?

Federico Marini (15:37:00): > i checked my notes but found no exact info

Kevin Rue-Albrecht (15:48:11): > Don’t think we did. I mainly took note of a list of objectives for this week

2018-01-17

Kevin Rue-Albrecht (05:19:53): > still no progres on the TravisCI side:cry:i have just finished cleaning up my colDataPlot; i think you’ll like it; if so, I’m happy to apply the same pattern to the other plotting functions

Kevin Rue-Albrecht (05:24:16): > the update also includes some new helper functions to build theaesandlabscomponents of the plot

Kevin Rue-Albrecht (05:38:57): > @Federico Marini: my Travis builds just finished and merged. Yours are being built

Kevin Rue-Albrecht (05:40:07): > although now, Github requires that you “Merge the latest changes from master into this branch.” (https://github.com/csoneson/iSEE/pull/46) - Attachment (GitHub): welcome aceEditor with syntax highlighting by federicomarini · Pull Request #46 · csoneson/iSEE > Contribute to iSEE development by creating an account on GitHub.

Federico Marini (05:41:43): > ok thanks for the heads up

Kevin Rue-Albrecht (05:42:30): > it’s a bit self-serving: I’m so looking forward to your aceEditor update:smile:

Federico Marini (05:54:19): > pull request merged

Federico Marini (05:54:24): > waiting for CI:slightly_smiling_face:

Kevin Rue-Albrecht (05:58:37): > nice

Kevin Rue-Albrecht (07:31:38): > alright, pushing and merging an update to apply the cleaner code storage for redDim as well (refresher: I did colDataPlot earlier this morning)

Davis McCarthy (14:23:39): > all: do we have a roadmap/plan for features that are planned/in progress? I’m gathering a whole lot of thoughts about the app now, but will try not to harp on about things that are already planned/in progress

Davis McCarthy (14:24:30): > Great work on the package so far! Exciting to see such excellent progress on the package. I’m excited to see how far we can take it

Kevin Rue-Albrecht (15:16:04): > @Davis McCarthy: We haven’t drawn a road mapper seat the moment. > Same thing here: lots of idea flowing through my mind as I clean up the existing code. I started using issues labelled as ‘Enhancements’ as a good place to keep track of ideas, discussion (and reasons to discard them, if applicable). I don’t think we’re excessively worried about giving away ideas that other would implement, are we?

Federico Marini (15:52:54): > One idea that came to my mind for the tracking: what about a way to bookmark the app, probably without the need of shiny’s bookmarks

Federico Marini (15:53:20): > whatever is active gets stored, and that can be passed as a parameter when re-launching the app

Federico Marini (15:53:32): > maybe@Aaron Lunhad something like this envisioned

Federico Marini (15:53:40): > or maybe I am overkilling

Charlotte Soneson (15:57:18): > I think that would be pretty nice. I tried it once (with abookmarkButton), and it worked quite nicely except forDataTables which were somehow not restored.

Federico Marini (15:59:32): > ok, probably not overkilling, but not highest priority then:stuck_out_tongue:

Aaron Lun (16:05:08): > Yes, the memory can be returned to the R session for bookmarking. Some extra work is required to fully preserve datatable memory; currently only the selection is preserved. Brushing will also not be preserved easily.

Kevin Rue-Albrecht (16:24:58): > i’ve never tried to restore inputs and states between sessions: is it at all possible to dumpinputandscein an*.rdafile, and restore them in a later session? or is that just too crude?

Aaron Lun (16:33:13): > I don’t think we can interceptinputand re-set it in a new Shiny instance. We can, however, dumpmemory, which allows us to easily restore most settings by passing the relevant default arguments toiSEE.

2018-01-18

Aaron Lun (13:12:52): > @Kevin Rue-AlbrechtI’m looking atclean_geneexprsnow and it seems to me that your.all_aes_*constants are only ever used inplotting.R. If they’re not cross-file constants, they can be kept withinplotting.Rfor clarity.

Kevin Rue-Albrecht (13:13:14): > crossed my mind too, forgot to ask

Kevin Rue-Albrecht (13:13:47): > i’m just polishing before offering the PR; so i’ll include that in my next commit

Kevin Rue-Albrecht (13:15:19): > I was just about to post: > It’s quite an important update to the geneExprsPlot function. Not in term of function, but of inner working. > I’d really appreciate if you could all build the latest commit, test the app, and let me know if I had a big oversight anywhere

Kevin Rue-Albrecht (13:31:06): > Alright. i’m officially done. pull request submitted. Travis in action > I’ll wait for feedback before I merge it tomaster

Kevin Rue-Albrecht (13:42:25): > @Kevin Rue-Albrechtuploaded a file:To group or not to group..and commented: The doodle that will go down in history as my flashlight in the midst of inputs to geneExprsPlot:stuck_out_tongue_winking_eye: - File (JPEG): To group or not to group..

Aaron Lun (13:45:37): > Why is it so combinatorial? I would have thought that the colour would be independent of the x-axis.

Kevin Rue-Albrecht (13:49:34): > It’s not the color, it’s the grouping of x and color categorical variables into violins

Kevin Rue-Albrecht (13:51:02): > I meant the color is independent of the axis. But grouping of violins and jitter is affected differently by combinations of x and color. Whether they are categorical or continuous

Aaron Lun (13:51:09): > Ugh.

Aaron Lun (14:01:39): > @Kevin Rue-AlbrechtLooks pretty good, though I would suggest that the points are bounded by the violin if that’s possible - makes it easier to track which point belongs to which x-axis grouping.

Aaron Lun (14:03:33): > Was there anything specifically you wanted us to check?

Aaron Lun (14:05:16): > I have a grant application to edit, but I really don’t want to do it.

Kevin Rue-Albrecht (14:06:06): > briefly functionality: if anything jumped to your eyes as having changed in a way you don’t like

Kevin Rue-Albrecht (14:06:51): > and then whether the code looks more readable/commented to you

Kevin Rue-Albrecht (14:08:26): > also i think the new organisation should have solved that. i’ll check theR CMD check - Attachment: Attachment > Note that .make_geneExprPlot seems to have a bunch of unbound variables.

Aaron Lun (14:16:39): > Okay visual suggestions: > - constraining points within the violin if possible (ggbeeswarm? Can’t remember howscaterdoes it). > - vertical axis labels? I’m open to adding an user checkbox for this, if you think it might help.

Charlotte Soneson (14:25:04): > Another little addition: I just pushed thexygenebranch (with the currentmastermerged into it), which allows gene selection for the x- and y-axes ingeneExprplots via either gene tables or text boxes.

Aaron Lun (14:25:55): > Hold on, I see what’s happened here.

Aaron Lun (14:26:34): > Right, I see where the complication comes from.

Aaron Lun (14:29:33): > Honestly, I think colouring the points is sufficient, which should dramatically reduce the complexity of your code. I don’t think we need to stretch ourselves to break up the points by the chosen coloring factor for violin colouring (which conflates colouring and the position of the points on the plot, which in turn will cause heartache during brushing).

Aaron Lun (14:30:43): > Nonetheless, I do like the violin colours; may I suggest a sensible automatic colouring scheme (nothing too flashy) when colour type is set to “none”, just to give the plot a bit of pizazz.

Aaron Lun (14:31:49): > Onto the code:

Aaron Lun (14:33:11): > - the density of comments is pretty high. Probably could ease off a bit, e.g., lines 57-90. > - looks alright otherwise, though I don’t understand any of the ggplot stuff.

Kevin Rue-Albrecht (14:35:25): > To be fair Charlotte’s code originally had that ‘default colouring’, it disappeared when i linked the colouring directly to theaes, and i had its reinsertion on my low-priority list. Fair point though

Aaron Lun (14:36:56) (in thread): > Looks like you scooped me on the conditional panels…

Aaron Lun (14:37:17) (in thread): > Do me a favour and add it to the column data plots as well?

Kevin Rue-Albrecht (14:54:33): > btw, thanks for the feedback: i’ve copied it into a local to-do list, if no one gets to those things before i can

Federico Marini (15:33:10): > my 2 cents on the violin/swarm: I recall ggbeeswarm and sinaplot doing what we aim to do

Federico Marini (15:33:26): > probably scater’s solution was already good enough?

Charlotte Soneson (15:34:14) (in thread): > Ok

Federico Marini (15:34:42): > maybe i missed it: can we do a gene vs gene scatter plot?

Kevin Rue-Albrecht (15:34:56): > yep: geneExprsPlot

Federico Marini (15:35:06): > (at best with the genes not absolutely linked to the tables)

Kevin Rue-Albrecht (15:35:47): > until Charlotte’s branchxygenesis merged to master , you’ll have to add another gene table

Federico Marini (15:35:55): > aah ok

Kevin Rue-Albrecht (15:36:14): > here - Attachment: Attachment > Another little addition: I just pushed the xygene branch (with the current master merged into it), which allows gene selection for the x- and y-axes in geneExpr plots via either gene tables or text boxes.

Federico Marini (15:36:38): > dammit. read, fede, read:stuck_out_tongue:

Federico Marini (15:36:47): > ok sorry i missed that

Charlotte Soneson (15:54:58) (in thread): > Done

Aaron Lun (15:55:33): > ggplot team; tell me when you’re ready to incorporate brushing.

Aaron Lun (15:55:38): > Otherwise I’m going to sleep now.

Charlotte Soneson (15:55:53): > I think I’m reasonably done, any objections to mergingxygeneintomaster?

Aaron Lun (15:56:06): > shoot first, ask questions later, that’s my motto.

Charlotte Soneson (15:57:59): > Alright, I created the PR, waiting for Travis

Charlotte Soneson (16:12:52): > Ok, merged intomaster, I’ll remove thexygenebranch

Kevin Rue-Albrecht (16:41:47): > I’m happy with the state in which i pushed the ggplot aspect. **I’d say you can safely start incorporating the brushing on the first two plot types (dimRed and colData), while we think about alternatives behaviour for the third one. > I agree that the interaction ofxandcolorposition-dodging in geneExprs may cause problem with brushing that particular plot… although i don’t think it would be easier to brush on ‘regular’ violins. > I already have a pretty good idea how to avoid breaking up the points by the chosen coloring factor, ifneedbe

2018-01-19

Aaron Lun (05:36:45): > All we need are the plot coordinates for brushing, so that’s not really the problem per se. It’s more a conceptual issue regarding the separation of responsibilities (i.e., plotting and colouring). As it is now, it is inconsistent with the behaviour of the other plots. One can also easily imagine how this could lead to very messy plots, e.g., when there are different numbers of colours per level of a factor-likex, plus many levels ofx.

Aaron Lun (05:37:06): > I mean, it’s up to you. But I really think that it’s a lot more maintenance grief than it’s worth.

Kevin Rue-Albrecht (05:42:32): > No worries, I totally agree. > Charlotte put a lot of the ground work to handle this scenario, and before i saw how messy it can get, I also initially felt it would be clearer to ‘dodge’ the colors rather than overlay them

Kevin Rue-Albrecht (05:44:08): > I’ll just have to add an instruction to tell ggplot to group byxonly, even whencoloris categorical. Simple enough. It’s just another aesthetic ofggplotthat can override this type of interactions

Aaron Lun (05:48:39): > Does ggplot automatically try to separate things by colour? That’s insane.

Kevin Rue-Albrecht (05:48:58): > if they are categorical

Aaron Lun (05:49:07): > God.

Aaron Lun (05:49:16): > I thought that was some crazy thing you added in.

Kevin Rue-Albrecht (05:51:31): > nah, that’s why the code is a bit convoluted in geneExprs: we had to deal with the combinations of choices made by the user, but also the behaviour ofggplotin those scenarios

Kevin Rue-Albrecht (05:52:12): > interesting problem though, formally programming the decision-making that we do about layers to show depending on the type of data

Kevin Rue-Albrecht (05:53:55): > > df <- data.frame( > x = factor(sample(letters[1:5], 50, TRUE)), > y = rnorm(50), > color = factor(sample(LETTERS[1:5], 50, TRUE)) > ) > ggplot(df, aes(x, y, color=color)) + geom_boxplot() > ggplot(df, aes(x, y)) + geom_boxplot() > ggplot(df, aes(x, y, color = x)) + geom_boxplot() >

Kevin Rue-Albrecht (05:54:13): > here, some sample code to see the effect of interactions

Aaron Lun (05:54:32): > Missing a comma after they, extra comma after thecolor.

Kevin Rue-Albrecht (05:55:11): > my bad, i just reordered the code before sending it

Aaron Lun (05:55:18): > Ah, that’s just fucked up.

Aaron Lun (05:55:34): > What the hell is ggplot doing?

Kevin Rue-Albrecht (05:55:34): > in a fucked up way, it kinda makes sense though xD

Kevin Rue-Albrecht (05:56:39): > especially with boxplots and violins: you can’t color the one violin perxlevel with the rainbox ofcolorsthat ithisxlevel contains

Aaron Lun (05:57:19): > Yeah, but I just want to colour the points.

Kevin Rue-Albrecht (05:57:25): > you can color the individual data points obviously, but not the grouped distribution

Aaron Lun (05:57:56): > Can’t say I really care about the colour of the boxplot.

Kevin Rue-Albrecht (05:58:39): > I mean the ggplot2 team is pretty smart about their choices. It takes everyone a while to get used to it, but the ‘grammar of graphics’ that it implements is thoroughly thought of

Kevin Rue-Albrecht (06:00:21): > anyway, let me see if I can patch that grouping code that I have in mind; otherwise i’ll have to leave it for later while you get started with the first two types of plots

Aaron Lun (06:03:29): > Well, I think they’re letting aesthetic choices interfere with basic interpretation of the plot.

Aaron Lun (06:04:06): > Perhaps another solution would be to make the violins without colours, and then overlay the coloured points?

Kevin Rue-Albrecht (06:07:03): > That’s one possibility as well. Or to avoid ‘boring black’, make them all a the same color (not linked to an aesthetic)

Kevin Rue-Albrecht (06:08:22): > actually, that’s exactly the result i just got locally

Kevin Rue-Albrecht (06:08:39): > i’ll push the update now so that you can see

Kevin Rue-Albrecht (06:10:03): > i have to say, i understand now why they also split by color: this way you get the distribution within each interaction of levels. That information is lost when you draw a single violin byxlevel. You’ll get what i mean when you see for yourself.

Kevin Rue-Albrecht (06:11:06): > there you go, it’s on branchColor_does_not_group

Kevin Rue-Albrecht (06:28:41): > actually, the PhD student in our group may just have come up with the solution: i’ll see whether faceting helps!

Kevin Rue-Albrecht (06:29:43): > so long as the plot is streched to width=12 and the facets are on a single row, it might just be the best of both worlds

Aaron Lun (06:51:44): > The current branch looks so much better. If you add some jiggle to spread out the points within each violin plot it would be perfect. Also I would probably avoid colouring any of the violin plots at all - even if all points are of the same colour - for consistency, to avoid problems with interpretation where a plot suddenly changes colour due to the loss/gain of one point.

Kevin Rue-Albrecht (06:51:47): > i think we got a winner

Kevin Rue-Albrecht (06:52:03): > i like the facets a lot

Aaron Lun (06:52:07): > Can you brush across facets?

Kevin Rue-Albrecht (06:52:23): > aaaargh, that’s a good question

Kevin Rue-Albrecht (06:53:07): > let me push the code to the new branch, and we can all make our opinion

Kevin Rue-Albrecht (06:54:05): > here you go

Kevin Rue-Albrecht (06:54:14): > branchFacet

Kevin Rue-Albrecht (06:55:11): > argh.. answer is no

Kevin Rue-Albrecht (06:55:33): > but it looks so pretty:unicorn_face:

Aaron Lun (06:55:48): > Oh well.

Aaron Lun (06:56:08): > I think yourColor_does_not_groupis fine.

Aaron Lun (06:56:17): > Just needs a bit of polish.

Kevin Rue-Albrecht (06:56:19): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-01-19 11.55.56.png - File (PNG): Screenshot 2018-01-19 11.55.56.png

Federico Marini (06:56:43): > hashtag meToo for the Color_does_not_group

Federico Marini (06:56:53): > it looks “just clean”

Kevin Rue-Albrecht (06:56:54): > sorry bad example

Kevin Rue-Albrecht (06:57:08): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-01-19 11.56.45.png - File (PNG): Screenshot 2018-01-19 11.56.45.png

Kevin Rue-Albrecht (06:57:42): > no worries, i’ll go with the majority vote

Federico Marini (06:58:18): > If needed to have my choice win, I’ll request to have the kids’ votes count too:smile:

Kevin Rue-Albrecht (07:00:10): > i’m happy knowing that i’ve shown the different possibilities

Kevin Rue-Albrecht (07:28:55): > i’ll merge theColor_does_not_groupin the next few minutes. I’ve polished it a bit. > One interesting side-effect feature: violins are colourless if they contains data points of different colours; otherwise (if all the data points are the same colour) they take up that colour

Kevin Rue-Albrecht (07:31:15): > I kinda like that, as an immediate information. > Also, no matter which default behaviour we choose, there will always be users who would like it different. As long as we have reasonable default that we can integrate with brushing, and that we give the code of the plot to the user, they can fiddle the appearance to their heart’s content

Federico Marini (07:32:02): > aaaaaand if the users have such wishes, they’ll be our guests in changing themselves the code we return:wink:

Kevin Rue-Albrecht (07:33:20): > Yeah - that was my last point. Sorry I get a bit more poetic than clear in my writing sometimes

Aaron Lun (07:42:24): > Fine with me.

Aaron Lun (07:43:00): > @Federico MariniCan we start stitching up the code tracker to the ggplot code inpObjects$memory?

Aaron Lun (07:44:59): > ggplot team: I think we need to think about how to handle the ColData plot, for all choices of x/y covariate/factor. X=covariate Y=covariate is a simple scatter plot; X=covariate Y=factor is a horizontal violin plot; X=factor Y=covariate is a vertical violin plot; X=factor Y=factor is… what? I was thinking of circles in a grid, where points are jittered throughout the circle and the area of the circle is proportional to the number of points.

Aaron Lun (07:46:38): > In theory, the same issue also arises for the gene data plot, for arbitrary assays you could have factors.

Federico Marini (07:47:29): > @Aaron LunI’ll start looking into it. As far as I could seem to “sense” from brief checks of the latest versions, the ggplot team saves the entire codeas well asthe values of the parameters?

Aaron Lun (07:47:51): > I think so, so there’s no need to print code defining the parameters as you’ve currently done.

Federico Marini (07:48:24): > I did not know back then how many gifts I could get:smile:

Aaron Lun (07:48:28): > Sure

Federico Marini (07:48:53): > Oh well. It is going to be “just easier”

Kevin Rue-Albrecht (07:48:55): > ah right. thanks for reminding me: i noticed that I was fixing stuff in geneExprs that I wasn’t back-porting to similar situations in colDataPlot

Kevin Rue-Albrecht (07:49:04): > then i forgot

Aaron Lun (07:49:14): > I’d imagine you could actually have one central function for both things.

Aaron Lun (07:49:40): > Hell, we could have one central function for all things

Aaron Lun (07:49:46): > no reason why the reduced dims couldn’t be factors either.

Aaron Lun (07:49:50): > Though that would be sort of weird.

Kevin Rue-Albrecht (07:50:38): > eh.. not sure what you guys mean by ‘storing the parameters’. We identify them, process them, and stitch them in the command, but we’re not returning them individually. Although theheadersection that I recently added would be a fine place for that

Aaron Lun (07:53:50): > I interpreted it as the parameters were part of the returned plot commands.

Aaron Lun (07:54:04): > so no need to define new variables with the set parameter values.

Kevin Rue-Albrecht (07:54:05): > I agree with your idea of refactoring things into functions: you probably noticed that I have done that during my clean up of the three types of plot. > However, I need to emphasise that this was only possible thanks to all the work Charlotte and I initially put into writing draftier versions of those functions. > What I mean is that the refactoring will take place iteratively. It wasn’t possible as long as Charlotte and I were doing things in slightly different ways

Aaron Lun (07:54:25): > Yes, of course, agreed

Kevin Rue-Albrecht (07:56:36): > Ok. For now, I’ll assume that giving the plotting code is implicitely giving away the inputs. That will avoid overcrowding the tracker. Let me know if later I should also explicitely list the individual inputs in the header.

Aaron Lun (07:57:12): > I think implicit inputs in the plotting code is fine - hopefully people should be familiar enough with ggplot to pick it apart.

Federico Marini (07:57:51): > I’d say I take a good look and get back to you if something is weird. Pretty confident it is already everything in good shapes & formats

Charlotte Soneson (08:18:54): > Sorry I’m late to the discussion, had to go to the gym:weight_lifter::slightly_smiling_face:I like theColor_does_not_groupas well, just tried it and it looks nice to me. For the implicit parameters in the code, I think that it is easier that way, and the code gets much shorter.

Aaron Lun (08:59:37): > Alright, looks like we’re all on the same page. Once you guys are happy with the state of the plotting code, I can point out how the brushing will work. (Let’s use only the reduced dims as an example, for the time being.) Either I can tell you guys how to do it, or you can put in some code showing me how to plot/highlight a subset of points inggplot.

Kevin Rue-Albrecht (09:04:16): > well, i’ve never set up brushing so far, and i’m trying to get some things done before the weekend, so I’m happy to let you or Charlotte get started on the brushing. I’ll try to follow the conversation though,

Davis McCarthy (11:37:40): > have you figured out settinggroup=1in ggplot to avoid grouping by colour if not desired?

Davis McCarthy (11:38:00): > (apologies if obvious/redundant - I only just skipped the many messages since this morning)

Davis McCarthy (11:38:32): > Also at the risk of making redundant comments, here are some thoughts from a look at the package over the last couple of days (which I guess is Wednesday’s version?):

Davis McCarthy (11:38:40): > - Help and tour is good (needs some fleshing out, but great start) > - I find the “brushing” confusing. The term itself is not familiar to me, so > I don’t immediately intuit what it should do and the help doesn’t explain > it in enough detail. I suggest we have a help item particularly for > brushing that could pop up for people to see/remind what it is without > going through the tour again. > - Standard R help/docs not available when Shiny app is running, so needs > to be completely self-explanatory (have docs/explanation available from > app) > - Do we have a roadmap/plan for features we want to add and where to track progress? > - I don’t like the default ggplot2 colormap for continuous variables; not > a useful scale and too “vanilla” > - Would really like information on mouse hover - should be an option to > select what to show on hover > - Related to the above, for an “interactive” tool the bokeh R/Python > package is a good example of what we’d like: easily move + zoom plot > area, details on mouse hover over points > - Can I select one or more cells, either by clicking or selecting by area > and have the names saved to file or R session? Would be great for > defining cell sets both for QC and biology > - Option to add a smoothed fit to 2D scatter plots (gene expression and colData) > - For gene expression plot I seem to get expression for the same gene > plotted on both axes. Do I need to define a second gene table to plot > expression of two genes against each other? I don’t find this very > intuitive; at the very least needs explanation. > - Inconsistent plot style between reduced dim and other plots > - “Extract the R code” looks like it just has variable definitions, but > does not have function calls or the code that would let me reconstruct > the plots outside of the app. That’s the aim, right? > - ‘overview first, zoom & filter, details on demand’ is the ‘Visual > Information-Seeking Mantra’ for large datasets - we should apply this! > - Will this run from a remote cluster? Two use cases: > (1) I have a very large dataset and can’t/don’t want to analyse it on my > local laptop/desktop. Will I be able to access the shiny app locally > through ssh port forwarding or similar? (the rmote pkg by Ryan Hafen is > a good example/motivation there) > (2) I produce a dataset for my > biological collaborator on my institute’s cluster. The dataset is too > big to transfer/they don’t have the setup to run iSEE locally on this > big dataset. Can I make the app available for them to access through a > browser? > - Could we do the above but from a cloud environment (AWS/GCP etc)? This > would be great for exploring HCA data which will end up on all of those > platforms

Aaron Lun (11:38:50): > Jesus

Federico Marini (11:39:13): > DAVIS!

Federico Marini (11:39:14): > :smile:

Davis McCarthy (11:39:42): > Sorry - have been noting things down as I was able between other things

Aaron Lun (11:39:57): > Should break things up into threadable comments

Federico Marini (11:40:03): > we should probably address each point separately. is a github issue a good place for this?

Federico Marini (11:40:12): > something like we can keep things checked

Aaron Lun (11:40:29): > Yes, create one issue per point above.

Federico Marini (11:40:32): > with a box [ ] that gets [x] once addressed

Davis McCarthy (11:40:56): > I have severely limited time over the next few weeks, but will keep trying to comment and contribute (hopefully some code too) where I can!

Davis McCarthy (11:41:28): > Would you like me to turn these into GH Issues now?

Kevin Rue-Albrecht (11:43:26): > @Davis McCarthynot sure on which version of the app your suggestiongroup=1is based. But I think that’s the thing that I solved in my latest updates

Kevin Rue-Albrecht (11:44:07): > totally unrelated: not sure if you guys are aware the ‘Single Cell Genomics Day Livestream’ in onhttp://satijalab.org/scgd/livestream/ - Attachment (satijalab.org): Single Cell Genomics Day Livestream > Lab Webpage —

Aaron Lun (11:44:57): > Probably goes into#random

Kevin Rue-Albrecht (11:45:26): > sorry yeah

Davis McCarthy (11:45:45): > @Kevin Rue-Albrechtyep, looks like you solved the grouping stuff: nice one!

Charlotte Soneson (11:48:59): > Also the gene-vs-gene plotting is addressed in the latest versions

Kevin Rue-Albrecht (11:50:10): > > ‘Inconsistent plot style between reduced dim and other plots’ > I think I solved that while standardising the code of the three functions

Kevin Rue-Albrecht (11:52:53): > > Standard R help/docs not available when Shiny app is running, so needs > > to be completely self-explanatory (have docs/explanation available from > > app) > We could have atabPanelthat only contains static text of documentation (?)

Aaron Lun (11:53:47): > People only need to learn once; I would suggest putting stuff in the vignette. Possibly also a button that opens the vignette from the app.

Kevin Rue-Albrecht (11:55:27): > Indeed, I would definitely prefer pointing to documentation outside the app as much as possible. That was the only ‘in-app’ solution I could think of.

Federico Marini (11:55:57): > -> for this, I have had a similar experience withidealandpcaExplorer

Federico Marini (11:56:05): > both are almost shiny-only pkgs

Federico Marini (11:56:20): > the vignette is useful (as well as required, but we knwo that)

Federico Marini (11:56:54): > but the live help is mainly the persistent reminder of what needs to be done

Davis McCarthy (11:57:21): > OK, I’ve added those thoughts as issues on GitHub now.

Kevin Rue-Albrecht (11:57:39): > > I have a very large dataset and can’t/don’t want to analyse it on my > > local laptop/desktop. > I think we’ve drawn the line atvisualisingpreprocessed data. I would discourage any kind of computation within the app

Davis McCarthy (11:57:48): > Some you’ve already dealt with! That’s great

Federico Marini (11:58:10): > one thought additionally: some text from the vignette could be “duplicated” and inserted in a collapsible element. People can click it, read it if needed, then close it. Maybe something like…

Kevin Rue-Albrecht (11:58:16): > I am also very interested in point (2) though

Davis McCarthy (11:58:19): > I may not be able to/want to open a 12Gb SCE object on my laptio

Davis McCarthy (11:58:22): > laptop

Federico Marini (11:58:35): > a help icon in the top right corner - this triggers another modal with the juice of the vignette?

Davis McCarthy (11:58:44): > and I think making datasets available to collaborators is a massive potential for this package

Davis McCarthy (11:59:06): > And that makes the availability of help/docs within the app even more important

Davis McCarthy (11:59:29): > I’d like to share the data with the folks who generated it without moving the dataset or requiring them to install anything locally

Davis McCarthy (12:00:17): > I agree about not computing anything in the app

Kevin Rue-Albrecht (12:01:25): > I have also been thinking about large data sets. I would really love to see a feature that triggers when the data set is over certain thresholds of data points. Kind of a Google Maps dynamic level of detail: e.g. show groups of cells as filled ellipses

Davis McCarthy (12:01:52): > Yes, that sort of thing would really elevate this.

Kevin Rue-Albrecht (12:02:03): > However, that would require a bit of pre-computation to ‘know’ which groups of cells to collapse together

Davis McCarthy (12:02:11): > how can we show millions of cells without trying to plot millions of cells at once?

Kevin Rue-Albrecht (12:02:22): > I thinkgeom_density_2d()will be key

Kevin Rue-Albrecht (12:03:11): > although that would use color to show the local density of cells; which makes color unavailable for another covariate as currently possible

Aaron Lun (12:04:43): > I think we need something that preserves the point-based nature of things. There are strategies for density-dependent downsampling that we can use; certainly we don’t have to show all the points once the pixel space has been completely occupied. I’m sure we can easily determine whether the pixel space has been saturated within a local area, and basically stop plotting. This would allow us to keep colours for points and also brushing.

Aaron Lun (12:05:24): > This would be dependent on the size of the points; obviously if you docex=0.00001then you’ll never saturate the pixel space no matter how many points you have.

Kevin Rue-Albrecht (12:07:22): > Also, having too many data points will generate huge vector graphic files if we allow users to export plots from the app. > (I know we give them the code, but I assume we may add a ‘Save as …’ button to export them from within the app, no?)

Davis McCarthy (12:07:46): > yes, on both counts

Aaron Lun (12:08:10): > You could just right click and have save as image.

Kevin Rue-Albrecht (12:08:30): > that’s only saves a bitmap, no?

Aaron Lun (12:08:40): > yep, that’s the idea.

Aaron Lun (12:08:46): > If they want something else, they can just run the code.

Kevin Rue-Albrecht (12:09:33): > yeah, i was just getting to thinking this way. can’t give them manuscript-ready figures and a button ‘Save as Nature Letter’

Davis McCarthy (12:11:19): > they can do that if we’re all listed as co-authors

Davis McCarthy (12:11:31): > with veto rights for shitty papers

Federico Marini (12:13:54): > We should add tiny watermarks to the images

Federico Marini (12:16:10): > I recently stumbled into a publication with a figure clearly done with pcaExplorer - wrote them because I was curious. Found out they neither cite/refer/acknowledge that. And for a paper withTranscriptional landscape...in its title, tonothave the raw data accessible it is quite a joke

Kevin Rue-Albrecht (12:16:22): > hehehe … I was also tempted to put:copyright:in the header of the code printed by the plotting functions

Federico Marini (12:16:47): > https://www.nature.com/articles/s41598-017-01468-y- in case you are interested –> nature sci rep states openness also in their editorial policies. Oh well.:stuck_out_tongue: - Attachment (Scientific Reports): Transcriptional landscape of epithelial and immune cell populations re > Transcriptional landscape of epithelial and immune cell populations revealed through FACS-seq of healthy human skin

Aaron Lun (12:17:04): > Scientific reports…. ’nuff said.

Davis McCarthy (12:18:15): > No good:hankey:

Federico Marini (12:18:22): > Well, the not so funny part is that this data could be relevant to a project of a coop partner of mine. And I wrote to the editors innovember

Federico Marini (12:18:33): > as well as to the authors

Federico Marini (12:18:36): > well

Federico Marini (12:18:41): > we’re going OT, sorry

Kevin Rue-Albrecht (12:21:12): > bah.. it’s Friday:wink:

Federico Marini (12:24:59): > my friday is about to end with a post-christmas party of my new lab

Federico Marini (12:25:14): > the boss pays a fully fledged dinner to everyone:slightly_smiling_face:

Kevin Rue-Albrecht (12:25:40): > means we can come over?:innocent:

Federico Marini (12:26:46): > it’s in one hour from now. if you can make it, you can be my guest:smile:

Kevin Rue-Albrecht (12:27:32): > unfortunately…:stuck_out_tongue_winking_eye:

Federico Marini (12:31:01): > <!channel>, one thing I want to ask you. I am attending in 2 weeks from now a “single cell data” group meeting, and one of my mentors suggested I could give a short showcase of what (quoting his words) “this new shiny shining thing does”. Are you guys fine with that?

Federico Marini (12:31:22): > It would be not more than a flashlight-like talk

Kevin Rue-Albrecht (12:33:39): > Well, no matter how many more features we plan to add in the future, I am already proud enough of the current state of things to attract a user base, so my opinion is ‘give them the full tour!’

Charlotte Soneson (12:34:50): > Yeah, sounds good to me too. I think both marketing and user feedback are good at this stage.

Federico Marini (12:36:47): > I will report useful comments I will get there - although, I think you as developer base might already have (much)more exposure to scRNA-seq datasets than what local groups might have here in MZ

Aaron Lun (12:40:26): > Fine with me.

Federico Marini (12:40:58): > perfect, I’ll wait for Davis to have the unanimity

Federico Marini (12:41:07): > (if that is an english word)

Kevin Rue-Albrecht (12:41:51): > otherwise, just unleash the kids on him:stuck_out_tongue:

Federico Marini (12:42:23): > one way or another we willallagree:slightly_smiling_face:

Federico Marini (12:44:14): > BTW. My chance here to also thank you for pinging me back in Cambridge and having me hop on the iSEE-truck. It made > a- my december mood much more motivated > b- my skills better by looking at your code and coding styles > c- happy overall to get busy on something I wanted too and fill up the dull pure-service days

Federico Marini (12:44:31): > So, thank you. Takk, merci, grazie.

Federico Marini (12:45:56): > (d- the nice, refreshing enthusiasm of cooperative work where everyone isreallymotivated to get things done)

Kevin Rue-Albrecht (12:46:15): > Same here. With the experience of developing another Shiny app by myself, I can say that it’sa lotmore stimulating and enriching to work with you guys

Charlotte Soneson (12:46:51): > Totally agree!

Federico Marini (12:48:56): > I hope I don’t lose the fire once this is terminated:stuck_out_tongue:but it is really a different shift the one we use here. not autopilot, but jeez, everyone has its own nitro boost, and that’s just great:pray:

Kevin Rue-Albrecht (12:50:57): > hold on until Davis’ next batch of reviews to lose fire:stuck_out_tongue:

Kevin Rue-Albrecht (12:51:38): > he was just getting warmed up

Aaron Lun (13:03:24): > Well, as with all these projects, the best person to resolve an issue is the person who raised it.

Kevin Rue-Albrecht (13:09:01): > let me pass that point to my PI too (Steve Sansom):grin:

Aaron Lun (13:10:43): > Does he still remember how to code, or is he too far gone?

Kevin Rue-Albrecht (13:12:09): > oh no, he is on top of things with regard to coding

Aaron Lun (13:47:23): > I will try to deal with the brushing tomorrow, just for the reduced dimension plots.

2018-01-20

Aaron Lun (07:49:54): > is anyone there?

Aaron Lun (07:55:55): > Thebrush_integrationbranch demonstrates how abrushBycolumn is added to theplot.data, via a set of commands. I don’t know how to impose a transparency layer or to recolour the plot, so I’ll leave that to the ggplot team; but note there are a couple of helpful values inparam_choicesto drive this: > > param_choices[[.brushEffect]]==.brushColorTitle # use param_choices[[.brushColor]] to color > param_choices[[.brushEffect]]==.brushTransTitle # use param_choices[[.brushTransAlpha]] to choose alpha > param_choices[[.brushEffect]]==.brushRestrictTitle # subset plot.data to restrict it to the brushed points >

Aaron Lun (08:00:50): > I’ve only done this for the reduced dimension plots so far; however, it should be simple to propagate this to all other plots. I would suggest factoring out all colouring and brushing code to separate internal functions to avoid code duplication, given that the process of choosing the brushing points and colouring factors is more or less the same across plots. (I’ve already done a bit of this.)

Aaron Lun (08:02:30): > I’m going for lunch now, will be back in an hour.

Davis McCarthy (08:47:50): > ^^@Kevin Rue-AlbrechtVery happy for you to present and get some feedback!

Kevin Rue-Albrecht (08:55:47): > @Davis McCarthy: i think you meant@Federico Marini:smile:

Kevin Rue-Albrecht (08:58:27): > @Aaron Lun: I can take care of the transparency layer. I’ve got some code for that

Kevin Rue-Albrecht (09:07:02): > i assume you mean that we should continue coding on yourbrush_integrationbranch then? (to avoid merging tomastersomething that is only partially implemented)

Aaron Lun (09:13:41): > yes.

Aaron Lun (09:14:19): > Are you working on it right now? I was going to refactor the colours out - we’ll probably hit some merge conflicts if we work on it at the same time.

Kevin Rue-Albrecht (09:14:45): > no, i’m actually about to go out for a couple of hours, you’re good to go

Kevin Rue-Albrecht (09:16:01): > Plus, i got a bit ahead of myself: I meant that i know how to add a transparency layer without problem, however i still need to get familiar with what’s coming in from the brushing, and how to handle the different modes

Aaron Lun (09:16:56): > good, bcause I don’t want to work on this manuscript that I’m meant to be doing.

Kevin Rue-Albrecht (09:16:57): > feel free to leave a couple of print statements, to point me/us in the right direction

Kevin Rue-Albrecht (09:17:08): > hahaha exact same thing here

Aaron Lun (09:22:01): > Also, the currentse_nameis unsafe, as a user could have named their input SCE as"plot.data". In which case, the SCE variable would clash with our internal plotting variables. It would be safer to force users to define their SCE asseat the top of the reproduced code, e.g.,sce <- plot.datafollowed by our redefinitions.

Kevin Rue-Albrecht (09:23:13): > Agreed. I’ve kept racking my brain about a better way to deal with this aspect

Kevin Rue-Albrecht (09:23:42): > i can easily change it back; except if you want to do it

Aaron Lun (09:23:47): > I’ll do it.

Kevin Rue-Albrecht (09:23:50): > cool

Kevin Rue-Albrecht (09:24:48): > while we’re on the subject of where the input comes from, i’ve been thinking about supporting RDS files available online, likeiSEE(url="https://www.dropbox.com/s/2p2071rxqekari5/allen_sce.rds?dl=0")

Kevin Rue-Albrecht (09:25:37): > Haven’t done anything yet, but to me this would have an awesomeness factor >Inf

Kevin Rue-Albrecht (09:26:42): > (this is a real link that points to my public Dropbox where I put an RDS file this morning)

Kevin Rue-Albrecht (09:40:57): > Just toying with the idea above, i’ve run into this issue when I download it from Dropbox as a tempfile() and runreadRDS:https://support.bioconductor.org/p/74573/I don’t have a problem to runreadRDSon the local file though. > Anyway, i’ll go offline for a bit and inspect that later

Aaron Lun (10:55:49): > Done. Lines 70-84 inplotting.Rare set for implementing the brushing effect in reduced dimension plots. Depending on how that goes, we may be able to spin it out into a separate function for application to all plots.

Aaron Lun (10:57:10): > Note a few additional changes. (1) As I mentioned before,se_nameis no more.codetrack.Rwill have to definesefrom the name of the input object, as well asall.coordinates <- list()for holding brushing coordinates.

Aaron Lun (10:58:26): > (2) Intermediate variables needed to determine whether something is groupable is now evaluated directly from the commands incmds. This reduces redundancy, compared to them being defined separately in every case.

Aaron Lun (10:59:41): > (3) Evaluation is now performed within a separate environment to avoid variable conflicts. In addition,cmdshas been altered to separate commands intotodoanddone, to avoid wasting time re-evaluating executed lines.

Aaron Lun (11:00:23): > (4) DefiningColorByis constant across all plots, so this has been spun out into a separate function. The validation code also exists within this function, which halves the total number of lines inplotting.R.

Aaron Lun (11:01:35): > (5) I was wrong about being able to useggplotobjects directly inbrushedPoints, so we have to store the resultingdata.frames explicitly in memory. This is achieved with some modifications toiSEE.R.

Kevin Rue-Albrecht (11:11:26): > Nice work. I’ll look at the update code soon, just got a couple of other things to do before

Kevin Rue-Albrecht (11:14:57): > Regarding the Dropbox issue I pointed out above, it seems that neithercurl_downloadnordownload.filemanage to download the RDS file. > As I’m writing this, I just solved it:"https://<...>?dl=1"lets both functions download the file

Kevin Rue-Albrecht (11:18:40): > @Aaron Lun: i see you’ve got a PR, so I take it the code is stable as it is, and we’ll can all just branch out ofmasterto work on separate features once the PR is merged?

Aaron Lun (11:19:36): > No, I was just pressing buttons mindlessly. I’d like to see an example of brushing working before merging.

Kevin Rue-Albrecht (11:21:05): > ok. I just couldn’t resist looking at the code already: can you just explain the difference betweentodoanddoneincmdsnow, to save me time figuring it out from the code?

Aaron Lun (11:29:31): > commands are initially put intotodo. Upon evaluation (e.g., to figure out whether a colorby value is a factor or covariate), the commands are shuffled intodone. This avoids them being re-evaluated; see thePLOT EVALUATIONpoint in.make_geneexprsplot.

Aaron Lun (11:30:12): > Evaluation in the middle of the function is motivated by point (2) above.

Kevin Rue-Albrecht (11:31:08): > oh right, i got you

Kevin Rue-Albrecht (11:32:04): > indeed, i was a bit uncomfortable having to collect and store certain covariates in order to make decisions at the end. nicely done!

Kevin Rue-Albrecht (11:32:16): > and i see what you’ve done in.evaluate_remainder

Aaron Lun (11:32:40): > Well, John didn’t hire me just for my good looks.

Aaron Lun (11:33:08): > (Probably more of a 70:30 split.)

Kevin Rue-Albrecht (11:34:40): > one more question aboutbrushing: i get what ‘Restrict’ and ‘Color’ as supposed to do. Is ‘Transparent’ supposed to ‘hide’ the brushed points?

Aaron Lun (11:36:20): > The non-brushed points should be transparent.

Kevin Rue-Albrecht (11:36:50): > ahhhhh, good that you told me, makes sense

Aaron Lun (11:38:36): > Note that with restrict, the non-brushed points should not even show up (i.e., not just non-visible - they can’t be on the plot). This is necessary to allow FACS-like gating.

Kevin Rue-Albrecht (11:38:52): > yep, i imagined that

Aaron Lun (11:39:18): > good

Kevin Rue-Albrecht (11:41:00): > hmm.. just thinking about the ‘Color’ though: is it completely overriding the coloring parameters of the recipient plot (non-brushed points are set to black and only brushed points are colored), or should it be a ‘merge’ of the plot’s coloring, with the brushed points being ‘overplotted’ with the selected color?

Aaron Lun (11:41:52): > Merge.

Aaron Lun (11:42:17): > Let the user figure out what colour choice does not clash. Defaults to red, I think, which should be fine.

Kevin Rue-Albrecht (11:42:47): > Yep, sounds good.

Aaron Lun (11:42:53): > And the entire thing defaults to transparent, which is even better.

Kevin Rue-Albrecht (11:43:41): > i am so looking forward to the final result:smile:

Kevin Rue-Albrecht (12:52:28): > Anyone familiar with theBiocFileCacheandExperimentHubfunctions? > I’ve pushed a demo of how I’d expect users to access remote data sets, but at the moment it’s using a basiccurlcommand. See BranchurlIf anyone’s interested, I’m sure Lori would be happy to advise them

Kevin Rue-Albrecht (12:53:39): > The magic command to test the branch isiSEE(url = "https://www.dropbox.com/s/2p2071rxqekari5/allen_sce.rds?dl=1")And yes.. I’m aware it takes a bit of time to download the file, hence my point about using the Bioc cache

Kevin Rue-Albrecht (13:36:24): > I’ll merge it intobrush_integration, where i branched from. It’s dead easy to remove if we really don’t like it.

Aaron Lun (13:37:09): > I’ll leave the rest of the integration of the brushing to you guys, then.

Aaron Lun (13:37:18): > Merge it withmasterwhen you’re done.

Federico Marini (18:03:04): > midnight surprise coming

Federico Marini (18:03:47): > ggplot team, thanks to your new code, the tracking part works like a charm

Federico Marini (18:03:55): > and with super simple clean code

Federico Marini (18:04:42): > I added a small comment intro on the code, plus the indication to run and reportsessionInfo

Federico Marini (18:05:16): > on branchtrack_cmdsyou can give it a ride

Federico Marini (18:06:05): > @Aaron Lun: I don’t know what the plans for the brushing are, but: > - do we want it to be replicated in the tracked code? > - is it possible at all?

Kevin Rue-Albrecht (18:13:18): > heya

Kevin Rue-Albrecht (18:13:29): > mega ultra super suprise coming from the ggplot team too

Kevin Rue-Albrecht (18:14:04): > you remember that rocket that exploded because a programmer forgot a semi colon?

Kevin Rue-Albrecht (18:14:08): > that was me this evening

Kevin Rue-Albrecht (18:14:35): > i forgot to quote the colour to highlight brushed points by

Kevin Rue-Albrecht (18:14:45): > unfortunately, that colour was#FF0000

Federico Marini (18:15:02): > ihih:stuck_out_tongue:I branched frommasterso I did not see that happen

Kevin Rue-Albrecht (18:15:15): > and i’ve been fighting with an ‘unexpected end of input’ all evening

Kevin Rue-Albrecht (18:15:40): > that bloody hashtag was commenting out the end of the line

Federico Marini (18:15:51): > shiny can be nasty in error communication

Kevin Rue-Albrecht (18:16:35): > i’m all good now, i had all the rest correct, so it’s about 10 min before I can push the update

Kevin Rue-Albrecht (18:16:47): > for all three types of brushing

Kevin Rue-Albrecht (18:18:52): > let me push the brushing tonight, and we can make a decision tomorrow

Kevin Rue-Albrecht (18:19:24): > the app has become self-aware to the point that I think it will give the code of brushing by itself

Federico Marini (18:19:34): > I took the liberty to up the z. version number

Kevin Rue-Albrecht (18:52:37): > Hi<!channel>! > From the ggplot team to you: > Brushing is now fully integrated (all three kinds) to the dimRed plot. PR is open on branchbrush_integrationand will merge as soon as ready. > A few notes: > 1) axes of the dimRed plot are shown again, as the ‘restrict’ mode of brushing ‘zooms in’ the selected data points. Let me know if you think that we should preserve the original axes ranges instead. > 2) i plotexactlythe number of samples in the data set, i donotoverplot even when merging the colouring parameters of the plot and the coloring of brushed samples. Each subset of samples is in its own layer, and follows independent colour aesthetics. > 3) be gentle with the input buttons, let the app refresh before you click another button. i’ve had a few times the radio buttons flicker between two states because i clicked them too quickly. > 4) enjoy!

Kevin Rue-Albrecht (19:34:53): > Alright, i’m officially done for the night. Catch up tomorrow!

2018-01-21

Charlotte Soneson (02:20:07) (in thread): > This looks great! Regarding 1), I think the ‘Restrict’ mode should zoom in. Preserving the original axes can be achieved by ‘Transparent’ with the parameter set to 0.

Kevin Rue-Albrecht (05:55:57): > I’m aware of the build error; I’m adding a section about using theExperimentHubthat I willeval=FALSEas soon as I’m sure that the commands are correctly running locally.

Kevin Rue-Albrecht (06:12:48): > alright, i’m off again until the next bug report, if anyone wants to work on thebrush_integrationbranch

Kevin Rue-Albrecht (07:02:59): > @Aaron Lun, can you just look at my latest commit and polish it as you did before? > Testing theExperimentHubdata set made me realise we still hadn’t thoroughly addressed the “categorical covariate with too many levels” situation. > I have taken care of it in the colData plot with my ‘redundant evaluation’ approach which would benefit the same cleanup as you did before

Kevin Rue-Albrecht (07:04:00): > I’ll have to take care of this also for the dimRed plot, when coloring with such a covariate. Might do that first, so that you can bulk update the two situations

Kevin Rue-Albrecht (07:19:30): > ok, job done for dimRed now (through.process_colorby_choice)

Aaron Lun (07:19:51): > I actually think the plotting commands for all three plots can be centralized into one function.

Aaron Lun (07:20:04): > This function should dispatch according to whether X/Y are covariates or factors.

Kevin Rue-Albrecht (07:20:06): > probably

Kevin Rue-Albrecht (07:21:02): > i guess that’s better left as the last step of refactoring, what do you think?

Aaron Lun (07:22:50): > I think we should do it now, as the colour and brush applications will then easily follow.

Aaron Lun (07:23:05): > Can you give me some code to make horizontal violin plots?

Kevin Rue-Albrecht (07:23:32): > do them vertical and addcoord_flip() +somewhere in theggplotcall

Aaron Lun (07:23:41): > That might not be compatible with brushing.

Kevin Rue-Albrecht (07:24:27): > i’ll check now but i don’t think horizontal violins can be generated directly fromaes()

Aaron Lun (07:25:00): > Or maybe it is compatible, I don’t know.

Aaron Lun (07:25:04): > Haven’t tried.

Kevin Rue-Albrecht (07:25:13): > separate note: last one standing: when a colData with too many levels is used for X axis of the geneExprs plot

Kevin Rue-Albrecht (07:25:29): > i’ll put together a MWE to check the violin story

Aaron Lun (07:25:45): > Just checked out the brushing. YEAH

Aaron Lun (07:26:16): > Except that I think restrict should NOT zoom in; will elaborate on GH.

Kevin Rue-Albrecht (07:26:58): > there you go: > > df <- data.frame( > x = rnorm(100), > y = factor(sample(letters[1:5], 100, TRUE)) > ) > ggplot(df) + > geom_violin(aes(x, y)) > ggplot(df) + > geom_violin(aes(y,x)) + > coord_flip() >

Kevin Rue-Albrecht (07:27:14): > you’ll need to usecoord_flip

Kevin Rue-Albrecht (07:28:10): > from your brushing code, I think you can handle that with something like: > > "brushedPts <- shiny::brushedPoints(all.coordinates[['%s']], > list(xmin=%.5g, xmax=%.5g, ymin=%.5g, ymax=%.5g, > direction='%s', mapping=list(x=***y*** y=***x***)));" >

Kevin Rue-Albrecht (07:28:39): > or maybedirection="yx"instead of"xy", I don’t know enough about brushing at this stage

Kevin Rue-Albrecht (07:29:04): > (the stars were just to highlight the change, not actual code)

Aaron Lun (07:29:06): > It should be okay, it just copies what’s on the shiny object so if shiny is smart enough to handle it, so are we.

Kevin Rue-Albrecht (07:29:36): > yep - i’ll leave you to it then. I still have to prepare a lab meeting for Tuesday

Aaron Lun (07:30:45): > One more thing.

Aaron Lun (07:30:59): > Can you give me some code to plot covariate X/Y?

Aaron Lun (07:31:07): > i.e., two covariates against each other.

Aaron Lun (07:32:29): > I’d like to have circles of varying size on a grid, where each circle represents a combination of X/Y covariates and points are scattered randomly within each circle.

Aaron Lun (07:33:19): > The are of each circle should be proportional to the number of points.

Aaron Lun (07:33:50): > If you give me some code that can plot circles of varying size and center positions, I can do the rest.

Kevin Rue-Albrecht (07:42:55): > something like that? > > df <- data.frame( > X = rnorm(100), > Y = rnorm(100), > Size = runif(100, 1, 2) > ) > ggplot(df) + > geom_point(aes(x = X, y = Y, size = Size), alpha = 0.5) >

Aaron Lun (07:46:10): > That’s close, but I’ll be wanting to overlay points inside the circles. The circles will be like the violin plots.

Kevin Rue-Albrecht (07:47:30): > in that case, I suppose you’ll want to overlay two layers: > * one with the circles proportional to their content > * one with the individual data points all sized identically (setsize=...outside theaescall)

Aaron Lun (07:50:44): > Hm. I’ll just put that in a to-do clause for the time being, I’ll let one of you guys handle it.

Kevin Rue-Albrecht (07:53:32): > ok. > i’m sure you’re thinking of the important caveat that the ‘summary circles’ will need to be pre-computed by ourselves, and even so, that summary circles may: > * overlap one another (how will we deal with data points in the intersect?) > * not overlap a data point that is assigned to them

Aaron Lun (07:56:29): > This is all relatively easy.

Aaron Lun (07:56:39): > A bit of maths should be sufficient.

Kevin Rue-Albrecht (07:58:49): > sounds like you’re on top of this:slightly_smiling_face:i shine more in heuristic than in math

Kevin Rue-Albrecht (08:09:46): > Does the latest commit work for you, with regard to brushing? > I getinvalid 'times' argumentif i turn on brushing from colData plot to dimRed plot. > I’ve just added code locally to take care of the ‘restrict’ feature that you pointed out on GitHub? Restrict shouldnotzoom in anymore.

Aaron Lun (08:10:15): > Okay. How do you incorporate brushing into the violin plot?

Kevin Rue-Albrecht (08:10:15): > However, I don’t want to commit-push until I see it working locally

Kevin Rue-Albrecht (08:10:32): > as a sender or receiver?

Aaron Lun (08:10:35): > Receiver

Aaron Lun (08:11:18): > Well, whatever, I’ll just give it a shot.

Kevin Rue-Albrecht (08:13:19): > well, > ‘restrict’ is the simplest: > both yourgeom_jitterandgeom_violinlayers should now work on their own data usinggeom_jitter(aes(...), data = subset(plot.data, BrushBy))

Kevin Rue-Albrecht (08:14:43): > for the other two modes, you’ll need two layers ofgeom_jitter: > * one for the brushed pointssubset(plot.data, BrushBy)* one for the otherssubset(plot.data, !BrushBy)

Aaron Lun (08:14:50): > Don’t worry about it, I will just refactor and you can handle the rest.

Kevin Rue-Albrecht (08:14:56): > ok no worries

Aaron Lun (08:32:28): > Probably best not to commit anything ATM. Shit is getting real over here.

Kevin Rue-Albrecht (08:36:53): > no worries. as said, i don’t like commiting stuff i haven’t seen working locally first

Aaron Lun (09:30:43): > Refactoring is done. See if you understand what’s going on in the latest commit.

Kevin Rue-Albrecht (09:32:35): > will do, thanks for the update

Aaron Lun (09:32:59): > Note that transmitted brushes from violin plots won’t work properly, as the jitter is not applied to the plot.data but to the plot itself.

Kevin Rue-Albrecht (10:01:49): > huh.@Aaron Lundid you change the behaviour of colData plot on purpose or inadvertently by refactoring when X-axis = None ?

Aaron Lun (10:02:01): > Yes, on purpose.

Kevin Rue-Albrecht (10:02:08): > ok, just checking

Aaron Lun (10:02:17): > Didn’t really see the value of a rank plot if we have a violin.

Aaron Lun (10:02:45): > Anyway, w.r.t. transmitted brushes; what this means is that we will have to extract the x-coordinates from the plot after it is generated to override the plotting coordinates inplot.data.

Kevin Rue-Albrecht (10:02:57): > Fair enough. And more homogeneous behaviour with geneExprs plot, actually

Kevin Rue-Albrecht (10:03:14): > ahh… got you

Kevin Rue-Albrecht (10:05:05): > which reminds me, you said recently that you can’t extract coordinates from the ggplot object returned by the function? how come? data is always stored in thedataslot of ggplot objects

Aaron Lun (10:06:09): > Well, I had thought that we could directly callbrushedPointson the ggplot object, but that turned out to be a fail. So I just stored theplot.datainstead. Perhaps we could avoid the need for overwriting by usingggplot$data.

Kevin Rue-Albrecht (10:06:32): > i think so

Kevin Rue-Albrecht (10:08:15): > also, wrt brushing on violins, considering that the X-jitter is only aesthetic, can’t we just supply the Y-range of the brush input tobrushedPoints? I can’t see a reason why users would only want to brush the left side of a violin for instance… (random subset maybe?)

Kevin Rue-Albrecht (10:08:58): > alternatively, we just need to teach users to brush the full width of the violin to catch all points in the Y-range that they aim for

Aaron Lun (10:10:08): > Well, one can imagine that if you have multiple violins but you only want to capture the top half of the left-most violin…

Kevin Rue-Albrecht (10:11:27): > yep, then brush the full width of the left-most violin over the Y range that you aim for

Kevin Rue-Albrecht (10:12:01): > works for me

Aaron Lun (10:12:15): > datawon’t do it, it doesn’t store the jittered points.

Kevin Rue-Albrecht (10:13:16): > we don’t jitter over the Y axis, so as long as your brush is correct on the Y axis, and wide enough to cover the width of the violin you’re shooting at, it works for me

Kevin Rue-Albrecht (10:13:50): > to convince yourself, make the dimRed plot receive the brush from the geneExprs plot

Kevin Rue-Albrecht (10:14:07): > put the geneExprs X axis todriver_1_s

Aaron Lun (10:14:34): > Do we just need to cover the center of the violin?

Kevin Rue-Albrecht (10:14:40): > and brush the top half of the GN220 violin

Kevin Rue-Albrecht (10:15:06): > you’ll see the right-most cloud of points light up in the dimRed plot

Kevin Rue-Albrecht (10:15:33): > not the centre, the full width of the violin(s) that you’re interested in

Kevin Rue-Albrecht (10:16:11): > got it?

Aaron Lun (10:16:12): > Looks like it works with just the center.

Kevin Rue-Albrecht (10:16:16): > ah

Aaron Lun (10:16:41): > That’s actually alright, because it means you only have to cover the center when you have lots of violins.

Kevin Rue-Albrecht (10:16:52): > yep, you’re right, sorry

Aaron Lun (10:17:13): > Okay, that’s good enough.

Aaron Lun (10:17:19): > Let’s proceed with the rest.

Kevin Rue-Albrecht (10:17:35): > Exactly. > And I don’t want to hear users complain that they can’t do multiple selection (if they don’t want a violin in the middle)

Aaron Lun (10:19:25): > Cool. Integrate the brushing with the violin plots and let’s merge this branch.

Kevin Rue-Albrecht (10:20:02): > ok. At the moment, I’m putting back in the code to maintain axis range upon restrict

Kevin Rue-Albrecht (10:20:28): > in theory, it’s two lines. can’t wait to test

Aaron Lun (10:20:31): > In.scatter_plot(), I presume.

Kevin Rue-Albrecht (10:20:43): > yup

Aaron Lun (10:21:02): > The nature of the restriction will probably differ with violins - you’ll need empty spaces for missing factors.

Kevin Rue-Albrecht (10:21:51): > do we want to keep empty spaces for them? ggplot has an optiondroplevelsfor this kind of scenario

Aaron Lun (10:22:07): > Yes, to be consistent with what restirct does elsewhere.

Kevin Rue-Albrecht (10:22:26): > ok then,droplevels=FALSEit is

Aaron Lun (10:23:18): > Will character vectors need to be coerced to factors for this to work?

Kevin Rue-Albrecht (10:24:08): > axis range preservation for scatterplot: done

Kevin Rue-Albrecht (10:24:26): > ggplot automatically coerces character vectors to factors

Aaron Lun (10:24:31): > okay, cool.

Kevin Rue-Albrecht (10:24:53): > (hence my.nlevelswrapper around the realnevels)

Kevin Rue-Albrecht (10:25:58): > niiiiiicegeom_quasirandom!

Kevin Rue-Albrecht (10:28:58): > btw, can you help me figure out in the vignette, how I couldrunTSNEefficiently on theExperimentHubexample? I’ve tried reducingn_dimred, but my laptop still takes ages. Something I’m missing?

Aaron Lun (10:29:46): > How many cells? I can run 4000 on my desktop in 1-2 minutes.

Kevin Rue-Albrecht (10:30:42): > > > dim(eh1) > Features Samples > 23368 7706 >

Aaron Lun (10:31:04): > Run irlba outside and feed the PCs intoRtsne.

Kevin Rue-Albrecht (10:31:28): > data set is “RNA-Sequencing and clinical data for 7706 tumor samples from The Cancer Genome Atlas”

Kevin Rue-Albrecht (10:45:37): > @Kevin Rue-Albrechtuploaded a file:ExperimentHub: EH1 - File (PNG): ExperimentHub: EH1

Kevin Rue-Albrecht (10:45:39): > thanks

Aaron Lun (10:53:57): > What’s the necessary code to setylimandxlimin ggplot?

Kevin Rue-Albrecht (10:57:48): > those are functions rather than arguments in ggplot, basically, you add a statementxlim(15, 20) +in your ggplot call

Kevin Rue-Albrecht (10:57:54): > that’s one way

Aaron Lun (10:57:57): > Good enough.

Kevin Rue-Albrecht (10:58:20): > i tend to preferscale_x_continuous(limits=c(15,20), ...) +

Kevin Rue-Albrecht (10:58:37): > because you can simultaneously define more than just the limits

Kevin Rue-Albrecht (10:59:01): > btw, i’m almost done for the violin brushing

Kevin Rue-Albrecht (11:01:45): > … or were you trying to to somthing to the violin axis ranges?

Aaron Lun (11:01:52): > No, I’m implementing the zooming.

Kevin Rue-Albrecht (11:02:18): > i’ve got the brushimg sorted, but i’m still in the situation were restrict zooms in the violin

Aaron Lun (11:02:46): > I’m just dealing with the scatter plots for now, the violins should be untouched.

Kevin Rue-Albrecht (11:03:46): > Cool. Facing the problem that we talked about ealier: preserving axis ranges/ticks whether X, Y or both are discrete or continuous

Kevin Rue-Albrecht (11:03:50): > arf

Kevin Rue-Albrecht (11:04:08): > you know what, i’ll push already as it is, so that I have a checkpoint to work from

Kevin Rue-Albrecht (11:19:02): > ok.. i’ve got an implementation.. which breaks if the brush is empty:confused:

Kevin Rue-Albrecht (11:21:29): > doesn’t cause a full blown app crash, just a warning message in the plotting panel and the console.. but still, i’m not particularly happy

Kevin Rue-Albrecht (11:29:47): > oh… that is so cool: if you color by CancerType the dimRed plot in TSNE coordinates of the ExperimentHub data set that I demo in the vignette, it matches nicely the TSNE clusters

Kevin Rue-Albrecht (11:30:38): > they have so many covariates in that data set, that it took me time to figure out one that was matching the tSNE distribution

Kevin Rue-Albrecht (11:30:43): > anyway

Kevin Rue-Albrecht (11:31:26): > it’s not single cell, but i think it’s a cool demo of a relatively big data set that the app handles surprisingly smoothly

Kevin Rue-Albrecht (11:34:05): > @Kevin Rue-Albrechtuploaded a file:@Federico Marini: for your presentation - File (PNG): @Federico Marini: for your presentation

Aaron Lun (11:38:06): > Got a slightly buggy zooming working now.

Kevin Rue-Albrecht (11:39:53): > someone’s got to put the foundation stone to every house

Aaron Lun (11:43:32): > Realized I was doing it stupid

Aaron Lun (11:43:44): > It’ll probably take an hour to fix, let me think about it.

Kevin Rue-Albrecht (11:45:48): > No worries.

Aaron Lun (12:00:48): > irlba should go into suggests.

Aaron Lun (12:03:36): > zooming infrastructure has been built. See lines 297-305 ofplotting.Rto see how it is applied to scatter plots.

Kevin Rue-Albrecht (12:04:57): > @Kevin Rue-Albrechtuploaded a file:just another use example of use case - File (PNG): just another use example of use case

Kevin Rue-Albrecht (12:05:31): > irlba done

Aaron Lun (12:07:17): > I’m done for the day. See if you can get the zooming to work for the violin plots, and just merge the branch. We’ll discuss how to handle horizontal violin plots and double X/Y factors later.

Kevin Rue-Albrecht (12:10:04): > Ok. I’m pretty beat for the day as well. I’ll see what I can do, or it might tomorrow

Aaron Lun (12:10:06): > Will_to_work==0is evaluating toTRUE.

Kevin Rue-Albrecht (12:10:27): > not usingidentical?

Kevin Rue-Albrecht (12:10:42): > you daredevil:wink:

Aaron Lun (12:10:59): > I’m out of control, man.

Aaron Lun (12:11:10): > or maybe my will to work is integer.

Kevin Rue-Albrecht (12:12:48): > Anyway, really good progress today.

Kevin Rue-Albrecht (12:28:14): > @Kevin Rue-Albrechtuploaded a file:just to give everyone a quick idea of the zoom feature - File (PNG): just to give everyone a quick idea of the zoom feature

Federico Marini (12:28:49): > just got back from the zoo

Federico Marini (12:29:06): > and about the screenshot. looks as cool as we hoped:slightly_smiling_face:

Federico Marini (12:29:10): > well done

Federico Marini (12:29:40): > one thing catching up on previous messages: careful with using xlim and ylim: ggplot CUTS out the ones excluded

Federico Marini (12:29:54): > to really “zoom” we should use coord_cartesian

Aaron Lun (12:30:08): > Note sure what you mean by cuts out.

Kevin Rue-Albrecht (12:30:14): > same here

Federico Marini (12:30:30): > well…

Federico Marini (12:30:50): > the points are cut out “even more” than what the limits you specify

Federico Marini (12:31:16): > I’m up for dinner now, later I can send you a link/MRE demoing the two

Kevin Rue-Albrecht (12:31:19): > i mean, we only ever use xlim to “preserve” larger axis ranges than the ‘restricted’ data would leave

Kevin Rue-Albrecht (12:31:35): > we never uses xlim to zoom in and cut out points

Aaron Lun (12:32:37): > I’m currently using thescale_xlim_continuousto zoom in.

Aaron Lun (12:32:54): > Don’t fully understand the difference, but feel free to edit; it’s on the lines I mentioned above inplotting.R.

Kevin Rue-Albrecht (12:34:21): > ahh i think i got what Federico meant, from reading?coord_cartesian

Kevin Rue-Albrecht (12:34:42): > “Setting limits on the coordinate system will zoom the plot (like you’re looking at it with a magnifying glass), and will not change the underlying data like setting limits on a scale will.”

Kevin Rue-Albrecht (12:36:22): > i think that applies particularly for violin plots in our case: > If you ‘cut out’ points that are outside the axis limits, you’ll change the shape of the violin somewhat. > If you only want to “zoom in”, you need to keep all the data points, and zoom in the cartesian coordinates

Aaron Lun (12:36:40): > Okay… I guess this sounds like what we want.

Kevin Rue-Albrecht (12:38:15): > with that said, I’m happy to stay in the discussion today, but I can’t think about writing more code until tomorrow

Aaron Lun (12:44:46): > I’m done. I’m going home.

Aaron Lun (12:45:48): > But I guess I’ll fix your last bug report before that.

Aaron Lun (12:47:10): > Give me a MWE?

Aaron Lun (12:48:25): > I think I see it.

Kevin Rue-Albrecht (12:48:57): > you mean what to click?

Kevin Rue-Albrecht (12:49:23): > just open the app, and in colData plot selectdriver_1_sfor the X axis

Aaron Lun (12:49:26): > Yep.

Kevin Rue-Albrecht (12:50:02): > i think if you solve that one, you solve them all, as Sauron said

Aaron Lun (12:56:38): > Pretty sure it’s due to your lines 360-361 inplotting.R; commenting them out makes it work again.

Kevin Rue-Albrecht (12:57:23): > i’ll have a look

Aaron Lun (12:58:31): > Okay, I’m actually going home now.

Kevin Rue-Albrecht (13:00:11): > Ok, well i’ll just comment them out then. It was not a pretty implementation anyway

Kevin Rue-Albrecht (13:00:20): > catch up later

Kevin Rue-Albrecht (13:06:50): > done.

Federico Marini (13:19:38): > So, here would be the example

Federico Marini (13:19:49): > > df <- expand.grid( > X = seq(-3,3,by=0.5), > Y = seq(-3,3,by=0.5) > ) > ggplot(df) + geom_point(aes(x = X, y = Y)) > ggplot(df) + geom_point(aes(x = X, y = Y)) + xlim(-2.9,2.9) > ggplot(df) + geom_point(aes(x = X, y = Y)) + coord_cartesian(xlim = c(-2.9,2.9)) >

Federico Marini (13:20:11): > the second still includes the coords where the points would be but cuts them out

Federico Marini (13:20:18): > like a subsetting

Federico Marini (13:20:31): > while nr. 3 does more like a “pure zoom”

Federico Marini (13:21:01): > (nr.2 also says in the console that indeed some points are removed, i.e. the 26 rows…)

Federico Marini (13:23:28): > @Kevin Rue-Albrecht: thank you for the use case scenario. Do you all in the<!channel>also have an impactful example for the single cell case?

Kevin Rue-Albrecht (13:25:47): > What sort of impactful example?

Federico Marini (13:27:06): > a single cell dataset, where I know that e.g. this subset of cells is interesting because of [reason 1], and it is possible to identify them both in the redDim plot as well by checking the expression of [marker gene]

Kevin Rue-Albrecht (13:30:37): > Well initially I meant to look for a single cell data set in the experimenthub, but then I spotted that big TCGA data set that was cool too

Kevin Rue-Albrecht (13:32:59): > If you can find a single cell data set in the ExperimentHub, that’ll help make the Bioc core team happier as well as facilitating reproducibility for us

Kevin Rue-Albrecht (13:40:57): > there: > > library(ExperimentHub) > ehub <- ExperimentHub() > View(data.frame(mcols(query(ehub, "single"))))` >

Kevin Rue-Albrecht (13:44:03): > argh.. actually, it’s only the 1.3M neurons in there so far

Federico Marini (14:23:31): > So you got the GSE62944 based on the paper from the piccolo lab

Federico Marini (14:23:35): > ok

Federico Marini (15:09:33): > Just as a check: we agreed in the conference call on the most urgent features to implement to have the operational version of the app. > I noted down: > - brushing ->@Aaron Lun- reproducibility ->@Federico Marini- pimping up plots ->@Charlotte Soneson&@Kevin Rue-Albrechtminor ones: > - introjs based tour > - genes selectable also without need of linked table > - give code in most usable way to the user > - thoughts on the manuscript > - cosmetics on buttons & co

Federico Marini (15:09:45): > Seems to me we are at good pace

Federico Marini (15:11:07): > I’ll check also the open issues and report here again

Aaron Lun (15:52:01): > All hands to the violin plots. Get them playing nice with the brushing and zooming, and we’re good to release an alpha version.

Federico Marini (15:52:41): > Good to hear!

Federico Marini (15:52:51): > I can finalize the introjs tour

Kevin Rue-Albrecht (15:56:17): > I’ll look into the violins again. I’ve mustered a bit of will over dinner again

Federico Marini (15:57:46): > Is something with acliprintegration to copy to clipboard the text an overkill? Something that does not force the user to have clipr installed

Kevin Rue-Albrecht (15:58:05): > clipr for what? the tracker?

Federico Marini (15:58:14): > -> as Kevin said, click, ctrl-A ctrl-C just works…

Federico Marini (15:58:18): > yes

Kevin Rue-Albrecht (15:59:14): > i solemnly swear to answer all user contacts complaining about the lack of a ‘copy to clipboard’

Kevin Rue-Albrecht (16:00:22): > (please don’t write a cron job to send me emails about it)

Kevin Rue-Albrecht (16:04:10): > @Federico Marini, think of branching from the side-branch when it is as advanced as this one. that’ll help minimise conflicts (just in case)

Federico Marini (16:05:13) (in thread): > I did it from master only because I knew it would have been one line

Kevin Rue-Albrecht (16:07:26) (in thread): > Ok right. I didn’t check at the code change itself. I just know myself to think i’ll change one thing, and next thing i know, RStudio reindented all the file I worked on.

Kevin Rue-Albrecht (16:23:57): > Brushing in place for violins. Not sure why the zooming doesn’t work as for dimRed though (Aaron implemented the first one, and I haven’t bothered looking how yet)

Kevin Rue-Albrecht (16:24:39): > I’ll swap thescale_*(limits=)for cleanercoord_cartesiancalls now

Kevin Rue-Albrecht (16:27:25): > nevermind: found Aaron’s code

Kevin Rue-Albrecht (16:45:31): > <!channel>i confirm thatscale_*calls are now extinct, and that violin plots can be zoomed in

Kevin Rue-Albrecht (16:45:45): > how are we doing on that checklist ?

Kevin Rue-Albrecht (16:48:24): > @Federico Marini: on the ‘cosmetics of buttons’, i just remembered that the up/down arrows to move plots around can only be clicked in their leftmost part. Is that the case for everyone or just my RStudio viewer/Safari? Can something be done about it? adding a space character or something?

Kevin Rue-Albrecht (16:51:24): > it’s the only remaining thing on the checklist that I can think of

Kevin Rue-Albrecht (16:55:01): > ah no, one last thing of the to-do list that Aaron will recognise:ARGHH!

Federico Marini (17:04:12) (in thread): > I also ran into that. Need to check it on othr browsers.

Federico Marini (17:04:47) (in thread): > I like them as compact as they are, but as I said to Charlotte already, I am no js wizard

Federico Marini (17:05:04) (in thread): > and buttons work almost too nicely in shiny to evade them:stuck_out_tongue:

Kevin Rue-Albrecht (17:05:45) (in thread): > absolutely no worries

Kevin Rue-Albrecht (17:06:22) (in thread): > in fact, it’s soooo satisafying to nitpick about tiny things like this: means that we’re basically there

Kevin Rue-Albrecht (17:51:27): > off to sleep now

2018-01-22

Kevin Rue-Albrecht (03:17:27): > @Aaron LunI think I can give you a ggplot base plot to tweak for the ‘ARGH’ scenario

Kevin Rue-Albrecht (03:18:24): > I’m just on my way to work now

Kevin Rue-Albrecht (03:41:42): > Might post it in the#randomchannel too, but still more relevant for us: > the date of the “Oxford Single Cell Symposium 2018” has been announced recently:https://talks.ox.ac.uk/talks/id/1c7d836c-855b-4b86-9243-acdcd66bc727/“Speakers so far confirmed are: Wolf Reik (Babraham Institute); Ido Amit (Weizmann Institute of Science)”

Aaron Lun (04:08:43): > I am dealing with the ggbeeswarm problem today.

Kevin Rue-Albrecht (04:14:35): > ok - i have 99% implemented a draft of the ARGH scenario. I’m scaling the area of dots organised in grid by the number of data point within each combination. > Only issue is to define the scale to display in the legend. Proportions rarely go to 1, generally stay < 50% so half the scale is ‘generally’ useless

Kevin Rue-Albrecht (04:15:26): > I’ll find a reasonable scale, and ping it over to you for further tweaking

Aaron Lun (04:16:12): > WE shouldn’t need the sizes of the circles in the legend; this would be analagous to having widths of the violin plots in the legend.

Aaron Lun (04:16:38): > Let me fix the quasirandom before you commit. Or make sure it’s in a different function.

Kevin Rue-Albrecht (04:18:11): > do you mean I can just hide the legend of circle sizes?

Aaron Lun (04:18:54): > Yeah.

Kevin Rue-Albrecht (04:18:56): > let me know when you commit, then i’ll merge, push with the legend so you can see how bad it looks, and then i’ll remove the legend in the next commit

Kevin Rue-Albrecht (04:50:18): > does ggbeeswarm also involved looking at the horizontal violins? I may have thought of a solution. testing soon

Aaron Lun (04:52:28): > We won’t be using ggbeeswarm anymore, commit pending.

Kevin Rue-Albrecht (04:52:36): > awww

Kevin Rue-Albrecht (04:52:57): > i had never used it before, but i started liking that guy

Kevin Rue-Albrecht (05:04:20): > ok, i got the layout right, just need to throw the brushing and zooming back in

Aaron Lun (05:07:32): > violin scatter is fixed, assuming that ggplot converts factors into x-positions with a simpleas.integer(as.factor(x)).

Aaron Lun (05:07:46): > which it seems to do (and that’s what shiny assumes that ggplot does, anyway).

Aaron Lun (05:09:24): > Horizontal may be as simple as doing a coord_flip and hoping that shiny is smart enough to handle it.

Kevin Rue-Albrecht (05:10:10): > exactly,coord_flip, with a twist:

Kevin Rue-Albrecht (05:11:03): > you’ll have to swap the aestheticsaes(x = Y, y = X), so thatcoord_flipswaps them back in their rightful place

Kevin Rue-Albrecht (05:12:12): > i was adding anflip=TRUE|FALSEargument tobuild_aes(), but things got messy, so I’m back to focusing on the brushing and zooming of ‘two discrete covariates’ scenario

Kevin Rue-Albrecht (05:13:25): > I’d like to finish and push my update before either of us gets working on the flip thing, to minimise risk of code conflicts

Aaron Lun (05:14:11): > I’m not doing it, so it’s all yours. Have a look at how I handled the violin plot pre-processing if it helps.

Kevin Rue-Albrecht (05:16:00): > ok cool

Kevin Rue-Albrecht (05:19:23): > you removed irlba ?

Aaron Lun (05:19:27): > It’s in suggests.

Aaron Lun (05:19:35): > Why would it be in Imports?

Kevin Rue-Albrecht (05:20:39): > arf, my mistake, blind copy-paste i guess

Aaron Lun (05:21:37): > In any case, I think we need to rethink our Restrict strategy

Aaron Lun (05:21:54): > To demonstrate, set up three column data plots with Y-axis = NREADS and x-axis = driver

Aaron Lun (05:22:17): > Have plot 1 transmit to plot 2 , and have plot 2 transmit to plot 3.

Aaron Lun (05:22:29): > Set plot 2 to restrict.

Aaron Lun (05:23:09): > Brush the middle violin in plot 1, and brush the (now missing) first violin in plot 2.

Aaron Lun (05:23:20): > You’ll see the first violin in plot 3, even though it shouldn’t show up at all.

Aaron Lun (05:23:37): > In short, we need to do a hard subset ofplot.datain cases where restriction is specified.

Aaron Lun (05:24:03): > This is true of the scatter plots as well.

Aaron Lun (05:24:24): > I need to do something else ATM, but will be back onto this.

Kevin Rue-Albrecht (05:24:57): > ok, can’t check it immediately as i’ve got uncommited changes, but i’ll keep it in mind

Kevin Rue-Albrecht (05:25:11): > really got to finish my lab meetings slides too, today

Kevin Rue-Albrecht (05:25:26): > anything to postpone it is attractive:wink:

Kevin Rue-Albrecht (05:28:22): > PS: giving ourselves the code of the plot is so AWESOME for testing and debugging:pray:

Aaron Lun (05:48:16): > I wonder whether it is reasonable to expect downstream brushes to stay the same when upstream brushes change.

Kevin Rue-Albrecht (06:05:01): > maybe some resetting/clearing should be placed in reasonable places

Aaron Lun (06:06:29): > Ideally they should always be cleared. But this would make it painful for chained plots if you changed the top-level brush and had to re-do all the bottom level brushes as well.

Aaron Lun (06:06:56): > I’ll have to think about how best to implement this (to preserve brush memory and whatnot).

Aaron Lun (06:08:33): > Meanwhile, let’s reset all brushes to avoid weird shit happening.

Kevin Rue-Albrecht (06:11:14): > i’ve just pushed an update that lays out the bi-categorical plots, however brushing and zooming are still disabled

Kevin Rue-Albrecht (06:12:56): > i just need do something else, i’ll be right back to finish it up

Kevin Rue-Albrecht (06:58:44): > woot woot - polishing the brushing for bi-categorical plot

Kevin Rue-Albrecht (07:09:03): > tadaaaaa

Kevin Rue-Albrecht (07:09:20): > zooming and brushing implemented for bi-categorical plots

Kevin Rue-Albrecht (07:09:24): > feel free to adjust

Kevin Rue-Albrecht (07:16:48): > I’ve started feeling ashamed that iSEE writes cleaner ggplot calls than I do myself:grimacing:

Aaron Lun (07:40:35): > Looks good; I’ll make some changes (the encircling cirle should be colorless, and the points should lie within the circle).

Aaron Lun (07:42:21): > How can we directly control the circle radius?

Kevin Rue-Albrecht (07:42:37): > it’s thesizeaesthetic

Kevin Rue-Albrecht (07:42:47): > ahh wait

Kevin Rue-Albrecht (07:43:16): > look at?scale_radius

Aaron Lun (07:43:27): > Okay, will fiddle around with it; stand by.

Kevin Rue-Albrecht (07:43:39): > over to you

Kevin Rue-Albrecht (07:47:56): > i think this merge will be worth a version bump, btw:slightly_smiling_face:

Aaron Lun (08:17:47): > Well, the good news is that I’ve got the points where I want them.

Aaron Lun (08:18:07): > The bad news is that circles don’t appear as circles due to the differences in scaling between axes.

Aaron Lun (08:18:36): > Might be better to use rectangles, then.

Aaron Lun (08:18:43): > Or squares.

Aaron Lun (08:18:56): > How do I draw a rectangle in ggplot?

Kevin Rue-Albrecht (08:22:14): > geom_pathi think

Charlotte Soneson (08:22:14): > geom_rect()orgeom_tile(), depending on what you want to specify:http://ggplot2.tidyverse.org/reference/geom_tile.html

Kevin Rue-Albrecht (08:22:18): > or that

Aaron Lun (08:23:46): > You know what, I’ll just push and let you deal with it.

Aaron Lun (08:24:10): > Just replace the circles with squares, usingRadius(effectively half the square side length).

Aaron Lun (08:26:10): > Otherwise we would have to adjust the sampled point coordinates according to how the circles appear on the plot, which would be a real pain in the ass.

Kevin Rue-Albrecht (08:42:56): > @Kevin Rue-Albrechtuploaded a file:concept-logo-1.pdf - File (PDF): concept-logo-1.pdf

Kevin Rue-Albrecht (08:43:47): > :innocent:

Charlotte Soneson (08:52:51): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-01-22 at 14.51.41.pngand commented:geom_tile()can do something like this, is that what you intended (the side lengths are2*Radius)? - File (PNG): Screen Shot 2018-01-22 at 14.51.41.png

Kevin Rue-Albrecht (08:54:17): > That looks cool to me. Just with a little less vertical jitter.

Aaron Lun (08:55:29): > Note the bug fix.

Charlotte Soneson (08:55:33): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-01-22 at 14.54.50.pngand commented: I didn’t do anything to the jitter here. This is the corresponding plot with the circles, for comparison. - File (PNG): Screen Shot 2018-01-22 at 14.54.50.png

Aaron Lun (08:55:59): > I won’t touch gridplot for the time being, but I’ve fixed restriction everywhere else.

Charlotte Soneson (08:57:02): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-01-22 at 14.56.42.pngand commented: Ok, with the bug fix… - File (PNG): Screen Shot 2018-01-22 at 14.56.42.png

Aaron Lun (08:57:05): > Yeah

Aaron Lun (08:57:10): > that looks pretty good.

Aaron Lun (08:57:31): > Can we make the boxes colourless with outline only? Mimics what’s in the violin plots.

Aaron Lun (08:58:36): > Also,@Kevin Rue-Albrecht; note the use ofexpand=FALSEwhen zooming, which ensures a faithful zoom.

Kevin Rue-Albrecht (08:59:46): > yeah i saw it, yet didn’t really think about the reason why, I just trusted you. I get it now

Aaron Lun (09:00:33): > Alternative to the rectangles; if you want to be really creepy, we could identify the outer surface of the scattered plots and draw a line throughout it. It’ll probably even look like a cell.

Kevin Rue-Albrecht (09:01:21): > that’s how i pictured usinggeom_path

Kevin Rue-Albrecht (09:02:18): > but i’m far too lazy to implement that

Aaron Lun (09:02:23): > https://blogs.oii.ox.ac.uk/bright/2013/06/10/convex-hulls-with-ggplot/ - Attachment (Jonathan Bright): Convex Hulls with ggplot > I found this code buried in an old google group discussion which I thought I would repost. As with everything ggplot wise hat tip to the incredible Hadley Wickham. Often it’s nice to break do…

Aaron Lun (09:02:32): > But let’s take it easy. Bigger priorities right now.

Kevin Rue-Albrecht (09:03:21): > can someone addcoord_cartesian``iSEE-pkg.R?

Charlotte Soneson (09:03:55): > In the end, the convex hull of jittered points may look similar to a rectangle anyway, since it is not allowed to go “inwards” anywhere…

Aaron Lun (09:06:59) (in thread): > Feel free.

Aaron Lun (09:07:32): > If we were able to do this, we would sample from a more circular shape, and allow the hull to approximate it.

Aaron Lun (09:07:46): > I mean, let’s not think about this yet, let’s deal with the other major issues.

Aaron Lun (09:08:04): > I’m starting to regret mentioning this at all.

Aaron Lun (09:08:10): > :slightly_smiling_face:

Kevin Rue-Albrecht (09:08:10): > the vignette EH1 example produces an “Error: ‘x’ contains missing values” that I’m just tracking down now, only for the colData plot

Kevin Rue-Albrecht (09:08:24): > haven’t encountered it for the allen data set yet

Aaron Lun (09:09:12): > There is amergein the coldata for the gridplot, that may be the cause.

Aaron Lun (09:09:17): > Maybe. I’m not sure.

Kevin Rue-Albrecht (09:10:04): > wouldstat_ellipsebe too approximate for this@Aaron Lun?https://ropensci.github.io/plotly/ggplot2/stat_ellipse.html

Aaron Lun (09:10:47): > That might be okay, if I sample from a circle in the first place.

Charlotte Soneson (09:12:18): > I’ll push the rectangles in the meanwhile…

Kevin Rue-Albrecht (09:12:52): > I’ve pushed thecoord_cartesianimport.

Charlotte Soneson (09:14:21): > Usinggeom_tile()generates weird warnings thatheightandwidthare unknown, but everything seems to be working fine and apparently this is “more complicated than expected”:https://github.com/tidyverse/ggplot2/issues/1904 - Attachment (GitHub): Regression with width aesthetic in documentation · Issue #1904 · tidyverse/ggplot2 > A warning is omitted when using the width aesthetic, but still seems to produce identical plots. Example from ggplot2 documentation for geom_tile: 2.1 Documentation, Dev Documentation library(ggplo…

Kevin Rue-Albrecht (09:16:24): > well, if it works, just push the code, and we can all try to help track down, i’d say

Charlotte Soneson (09:16:29): > It is pushed

Kevin Rue-Albrecht (09:20:20): > keep up, Kevin, keep up ^^

Kevin Rue-Albrecht (09:26:56): > hm .. puzzle

Kevin Rue-Albrecht (09:27:22): > mah.. if Hadley can’t solve, I’d be bold to keep trying

Aaron Lun (09:27:22): > MWE

Aaron Lun (09:27:33): > What are we talking about - the mixxing values?

Kevin Rue-Albrecht (09:28:18): > the width/height warning ofgeom_tile

Kevin Rue-Albrecht (09:28:31): > you just need to select a discrete covariate for the colData plot

Kevin Rue-Albrecht (09:28:59): > nothing wrong with the UI, just some frustrating warnings on the console

Charlotte Soneson (09:30:38): > seems to be because of the different ways to specify rectangles. I quickly triedgeom_rect, but it doesn’t play well with the factors (you need to define the coordinates of the corners explicitly)

Kevin Rue-Albrecht (09:31:27): > i think we’re fine, we can just put the link above in the FAQ section of the vignette if anyone asks

Aaron Lun (09:31:43): > We can do the explicit coordinates.

Aaron Lun (09:31:47): > That’s not too hard.

Aaron Lun (09:32:01): > I mean, we have the positions and widths already.

Charlotte Soneson (09:32:24): > Yeah, just have to explicitly convert the factors to the corresponding numeric values

Kevin Rue-Albrecht (09:32:24): > Following on the GitHub issue from yesterday, I’ll probably add an FAQ about Seurat object. I see this one coming from far away

Aaron Lun (09:34:18): > However the vignette is being written, make sure we go one line per sentence, rather than have huge one-line paragraphs.

Kevin Rue-Albrecht (09:34:53): > yep - i’m bad with manuscripts in that way too ^^

Aaron Lun (09:45:59): > Note that currently, indenting is only done correctly when the previous line ends with “+”. Otherwise the code tracker looks a bit funny.

Kevin Rue-Albrecht (09:49:15): > I liked that. Are there still particular code generating places that need tidying up? I’ll open a session myself to check

Aaron Lun (09:50:53): > Oh, and it needs to end with a “+”. Literally. No spaces.

Kevin Rue-Albrecht (09:51:14): > hahah you got caught in that one too? ^^

Kevin Rue-Albrecht (09:52:36): > @Federico Marini: can we control the size (height, in particular) of the code editor/modal?

Aaron Lun (10:00:24): > Why is size=1.5 in unbrushed scatter plot?

Kevin Rue-Albrecht (10:03:19): > Dunno. I don’t remember setting this

Federico Marini (10:03:27) (in thread): > Yes we can

Federico Marini (10:03:37) (in thread): > I gave a default of 800px

Federico Marini (10:03:40) (in thread): > we can adjust it

Kevin Rue-Albrecht (10:04:32) (in thread): > Ok. On my screen (MacbookPro and iMac) it looks a bit small

Kevin Rue-Albrecht (10:04:47) (in thread): > But I don’t want to cause trouble to other users

Federico Marini (10:05:48) (in thread): > It can be made bigger, don’T worry

Aaron Lun (10:18:30): > Did you track down the EH1 problem?

Aaron Lun (10:18:56): > :wq

Aaron Lun (10:18:59): > whoops

Kevin Rue-Albrecht (10:24:13): > not yet, sorry

Kevin Rue-Albrecht (10:24:40): > actually, I wrote the print statements for debug, but got sidetracked

Aaron Lun (10:27:33): > I will merge the monster once the CI passes.

Kevin Rue-Albrecht (10:28:35): > ok

Kevin Rue-Albrecht (10:29:11): > mind if I extend the sliders to a minimal plot/panel width of 2 ?

Aaron Lun (10:29:28): > I don’t think you can see anything with that.

Kevin Rue-Albrecht (10:29:35): > I never thought I’d complain about this, but the iMac screen is too large

Kevin Rue-Albrecht (10:29:49): > I have a 16:9 view of my tSNE

Kevin Rue-Albrecht (10:30:19): > https://www.dropbox.com/s/am0kznhmcfey42m/Screenshot%202018-01-22%2015.30.10.png?dl=0

Kevin Rue-Albrecht (10:30:58): > maybe min=3, actually

Kevin Rue-Albrecht (10:31:31): > (but still a default of 4, that’s always been a good fit for my laptop)

Aaron Lun (10:34:33): > Well, I guess so. We’ll want to provide options to tune the row height as well, but this is later.

Aaron Lun (10:35:06): > Real tower of hanoi stuff

Kevin Rue-Albrecht (10:35:22): > i don’t if that changed, but I had to hack around to make row height a parameter inTVTB

Kevin Rue-Albrecht (10:36:21): > i never found a way to control it within an app, so I let the user set it as an argument of the function that launched the app

Aaron Lun (10:36:34): > That might be easiest.

Aaron Lun (10:36:53): > Well, I mean, we can control it, but we’ll have to re-render the entire UI.

Aaron Lun (10:37:10): > Which is fine.

Kevin Rue-Albrecht (10:50:43): > just to be clear about issue ‘Colormap for continuous variables’: > Feel free to define/choose a reasonable default colormap. > What I meant is that I’m interested in setting up the infrastructure for users to supply their own favorite colormaps.

Aaron Lun (10:51:02): > Yes, that’s what I thought as well.

Aaron Lun (10:51:26): > Allow them to specify a factor colormap and a continuous colormap.

Kevin Rue-Albrecht (10:51:46): > I know we said that users can always take the code and edit it in an interactive session, > but I know it can make a world of difference for them to navigate the data set with their own familiar colorscales

Kevin Rue-Albrecht (10:59:50): > I’ll rerunroxygenbtw: documentation out of sync withiSEE-pkg.RPlease hold off any change as this tend to reflow a lot of lines

Kevin Rue-Albrecht (11:01:53): > bah. apparently not this time. just updated theNAMESPACE

Aaron Lun (11:03:19): > These boxes were inspired.

Aaron Lun (11:03:33): > It makes so much sense; you can compare heights across rows, or widths across columns.

Federico Marini (11:03:53): > I am almost done with bringing further substance to the introjs tour

Federico Marini (11:05:30): > incoming soon in theextended_tourbranch

Federico Marini (11:06:14): > with changes that should not affect at all whatever other news came in for the brushing part

Federico Marini (11:08:59): > if I read correctly, now the whole brushing is already in master

Federico Marini (11:09:06): > so I can safely merge there

Kevin Rue-Albrecht (11:11:01): > you guys don’t have error messages instead of panels, about ggplot functions that the app can’t find? > for me it’s all the ones we recently added. > weird thing is the desktop has the issue, while the laptop doesn’t > so basically, I test on the desktop, code on the laptop, push, pull, and keep going:laughing:

Kevin Rue-Albrecht (11:12:47): > ok, we’re good now

Kevin Rue-Albrecht (11:14:05): > PS: min width of 2 is perfect now, for me

Kevin Rue-Albrecht (11:14:15): > https://www.dropbox.com/s/hlfnhueoguqj51q/Screenshot%202018-01-22%2016.14.11.png?dl=0

Aaron Lun (11:16:01): > coord_flip almost but not quite right.

Aaron Lun (11:16:36): > zooming doesn’t work, and the y boundaries aren’t being preserved when restricting.

Kevin Rue-Albrecht (11:17:26): > @Kevin Rue-Albrechtuploaded a file:possible demo data set - File (PNG): possible demo data set

Kevin Rue-Albrecht (11:17:51) (in thread): > ok, let me know if you do them all, or if you want to send some my way

Kevin Rue-Albrecht (11:18:23): > @Federico Marini: I’ll have a meeting with the collaborators who generated this 10x data set, see if I can send it your way for the talk

Kevin Rue-Albrecht (11:19:03): > it’s about to be submitted, so I’m hoping they’ll be happy to show off

Kevin Rue-Albrecht (11:19:44) (in thread): > let’s make this a thread

Kevin Rue-Albrecht (11:21:31): > @Aaron Lun: for this data set, I’ve just dumped the relevant slots of the Seurat object in the appropriate places of an SCE. Again I know your point is not that it’s particularly difficult, only a matter of separating responsibilities between packages developers

Aaron Lun (11:32:57) (in thread): > Fixed.

Kevin Rue-Albrecht (11:33:44) (in thread): > I know you don’t know them, but feel free to send me arguments to help me convince them that’s it’s harmless to them. I’m wondering myself what harm it could cause them: it’s a good data set

Kevin Rue-Albrecht (11:35:05) (in thread): > (who the audience will be, etc.)

Kevin Rue-Albrecht (11:35:48) (in thread): > Ok. I’m building again themasterbranch ATM, and I’ll investigate that EH1 bug

Aaron Lun (11:38:33): > <!channel>I think that all of the major structural features for the alpha release are implemented. (Brush memory is explicitly not going in yet, this requires a major think of how to incorporate that into the memoryandtrigger replotting of dependent plots.) I will leave it to everyone to implement their own little improvements.

Aaron Lun (11:39:18): > I will be implementing defaults for the gene tables sometime this week, but that’s it from me.

Aaron Lun (11:40:55): > @Charlotte Sonesondid you have a shiny server?

Charlotte Soneson (11:42:14): > Yes, we have a shiny server set up

Aaron Lun (11:42:56): > Could you test it withiSEEinapp.R, a la issue 64?

Charlotte Soneson (11:45:13): > Yep. I’m on the train now and away most of the evening, but I’ll try later or tomorrow.

Aaron Lun (11:45:18): > Okay.

Kevin Rue-Albrecht (11:45:40): > Different scenario, but we have an RStudio server over here. And I’ve been successfully running the app as a second tab in my browser

Kevin Rue-Albrecht (11:46:16): > so basically, all the computation happens on the cluster in this case too

Kevin Rue-Albrecht (11:48:27): > hang on, i’ll post that in the issue, i’d say it’s still relevant

Federico Marini (11:52:40) (in thread): > I’ll prepare a draft-y email

Federico Marini (11:52:52) (in thread): > but probably I’ll be fine with a good tour on the TCGA set

Aaron Lun (12:11:12): > Also, it’s branch pruning time.

Federico Marini (12:13:26): > :rocket:

Federico Marini (12:16:04): > uh

Federico Marini (12:16:22): > did thebrush_integrationdisappeared before merging the PR?

Aaron Lun (12:16:30): > No, should be okay.

Federico Marini (12:17:22): > This one errored for my merge

Federico Marini (12:17:35): > https://travis-ci.org/csoneson/iSEE/builds/331910373

Federico Marini (12:17:45): > but I see the edits in the master. Little puzzled, but it seems to have kept the edits

Aaron Lun (12:18:24): > Not sure what happened there.

Aaron Lun (12:18:55): > Don’t worry about it, I think it tried to pull at the same time I pruned it.

Federico Marini (12:19:13): > could be

Federico Marini (12:19:22): > anyway

Federico Marini (12:19:36): > happy we got to this point so quickly:slightly_smiling_face:

Kevin Rue-Albrecht (12:40:19) (in thread): > ‘that escalated quickly’:wink:

Kevin Rue-Albrecht (12:48:23): > @Aaron LunI found the issue with EH1

Aaron Lun (12:48:33): > go on…

Kevin Rue-Albrecht (12:48:33): > > > plot.data$jitteredX <- vipor::offsetX(plot.data$Y, > + x=plot.data$X, width=0.4, varwidth=FALSE, adjust=0.5, > + method='quasirandom', nbins=NULL) + as.integer(plot.data$X); > Error in density.default(y, n = nbins, adjust = adjust) : > 'x' contains missing values >

Aaron Lun (12:48:47): > goddammit

Kevin Rue-Albrecht (12:48:58): > can i just feed the non-NA values to offsetx ?

Aaron Lun (12:49:01): > this must have been throwing with ggbeeswarm as well.

Kevin Rue-Albrecht (12:49:26): > or does the vector need to be the length of data?

Aaron Lun (12:49:37): > Yes, it does.

Kevin Rue-Albrecht (12:49:37): > argh nevermind

Kevin Rue-Albrecht (12:49:50): > i need to stop typing as i think

Aaron Lun (12:50:04): > We’ll have to intercept before it. Add aplot.data <- subset(plot.data, !is.na(X))I think

Aaron Lun (12:50:35): > Same for Y.

Kevin Rue-Albrecht (12:50:40): > ok

Kevin Rue-Albrecht (12:50:41): > thanks

Aaron Lun (12:52:13): > I wonder whethersubset(plot.data, !is.na(X) & !is.na(Y))would be enough.

Kevin Rue-Albrecht (12:52:26): > should be

Kevin Rue-Albrecht (12:53:12): > hang on:&or|?

Kevin Rue-Albrecht (12:53:32): > because your first bit seemed would result in|

Aaron Lun (12:53:52): > Well it would need to be non-NA for both X and Y, otherwise it would all fall apart.

Kevin Rue-Albrecht (12:54:20): > fair enough, just checking, as I’m getting near brain-fried for today

Aaron Lun (12:54:24): > Actually, maybe it only needs to be non-NA for x.

Aaron Lun (12:55:04): > No, probably best to do it for both. Wouldn’t make sense anyway.

Kevin Rue-Albrecht (12:55:13): > i’m racking my brain whether we’re throwing away useful information or not

Aaron Lun (12:56:22): > In NA’s? Well, we could define these as a separate group.

Aaron Lun (12:56:45): > But if that were the case, people should have explicitly defined them as “unknown” or something.

Aaron Lun (12:56:50): > If it’s missing, it’s missing.

Aaron Lun (13:05:15): > Discarding them is technically correct. The best kind of correct.

Aaron Lun (13:06:08): > Putting a new “NA” field is no good; what about neuraminidase?

Kevin Rue-Albrecht (13:07:27): > Yep - sorry i’m slow, i’m getting there. Juggling with a few last figure panels for a manuscript.

Kevin Rue-Albrecht (14:13:09) (in thread): > Ok. Let’s keep each other posted

Kevin Rue-Albrecht (14:13:59) (in thread): > I’ll meet them tomorrow or Friday

Kevin Rue-Albrecht (14:14:56) (in thread): > But I’ll use iSEE in my lab meeting tomorrow and I’ll ask my PI already

Federico Marini (15:05:02): > I think I might have found a problem in the brushing. To reproduce it, here are screenshots and code

Federico Marini (15:05:35): > @Federico Mariniuploaded a file:Screen Shot 2018-01-22 at 21.03.00.png - File (PNG): Screen Shot 2018-01-22 at 21.03.00.png

Federico Marini (15:05:49): > @Federico Mariniuploaded a file:Screen Shot 2018-01-22 at 21.03.21.png - File (PNG): Screen Shot 2018-01-22 at 21.03.21.png

Federico Marini (15:05:55): > when the brushed points are kept transparent, it seems to me they are not subset correctly

Federico Marini (15:06:00): > by color they are

Federico Marini (15:06:03): > @Federico Mariniuploaded a file:Screen Shot 2018-01-22 at 21.03.33.png - File (PNG): Screen Shot 2018-01-22 at 21.03.33.png

Federico Marini (15:06:11): > using the EH1 example

Federico Marini (15:07:41): > > se <- sce1 > all.coordinates <- list() > > ################################################################################ > ## Reduced dimension plot 1 > ################################################################################ > > red.dim <- reducedDim(se, 'TSNE'); > plot.data <- data.frame(X = red.dim[, 1], Y = red.dim[, 2], row.names=colnames(se)); > plot.data$ColorBy <- colData(se)[,'CancerType']; > > # Defining the plot boundaries > xbounds <- range(plot.data$X, na.rm = TRUE); > ybounds <- range(plot.data$Y, na.rm = TRUE); > > # Generating the plot > ggplot() + > geom_point(aes(x = X, y = Y, color = ColorBy), plot.data) + > labs(x = 'Dimension 1', y = 'Dimension 2', color = 'CancerType') + > coord_cartesian(xlim = xbounds, ylim = ybounds, expand = TRUE) + > theme_bw() + > theme(legend.position = 'bottom') > > # Saving for brush transmission > all.coordinates[['redDimPlot1']] <- plot.data > > ################################################################################ > ## Column data plot 1 > ################################################################################ > > plot.data <- data.frame(Y = colData(se)[,'bcr_patient_barcode'], row.names=colnames(se)); > plot.data$X <- colData(se)[,'CancerType']; > brushedPts <- shiny::brushedPoints(all.coordinates[['redDimPlot1']], > list(xmin=30.007, xmax=51.089, ymin=-16.559, ymax=14.046, > direction='xy', mapping=list(x='X', y='Y'))); > plot.data$BrushBy <- rownames(plot.data) %in% rownames(brushedPts); > plot.data$X <- as.factor(plot.data$X); > plot.data$Y <- as.numeric(plot.data$Y) > plot.data$GroupBy <- plot.data$X; > > # Defining the plot boundaries > ybounds <- range(plot.data$Y, na.rm = TRUE); > > # Setting up the data points > plot.data <- subset(plot.data, ![is.na](http://is.na)(X) & ![is.na](http://is.na)(Y)); > set.seed(100); > plot.data$jitteredX <- vipor::offsetX(plot.data$Y, > x=plot.data$X, width=0.4, varwidth=FALSE, adjust=0.5, > method='quasirandom', nbins=NULL) + as.integer(plot.data$X); > > # Generating the plot > ggplot(plot.data, aes(x = X, y = Y, group = GroupBy)) + > geom_violin(alpha = 0.2, scale = 'width') + > geom_point(aes(y = Y, x = jitteredX), subset(plot.data, !BrushBy)) + > geom_point(aes(y = Y, x = jitteredX), data = subset(plot.data, BrushBy), color = '#FF0000') + > labs(x = 'CancerType', y = 'bcr_patient_barcode') + > coord_cartesian(xlim = NULL, ylim = ybounds, expand = TRUE) + > scale_x_discrete(drop = FALSE) + > theme_bw() + > theme(legend.position = 'bottom') > > ################################################################################ > ## Gene expression plot 1 > ################################################################################ > > plot.data <- data.frame(Y=assay(se, 'exprs')['1/2-SBSRNA4',], row.names = colnames(se)) > plot.data$X <- colData(se)[,'CancerType']; > brushedPts <- shiny::brushedPoints(all.coordinates[['redDimPlot1']], > list(xmin=30.007, xmax=51.089, ymin=-16.559, ymax=14.046, > direction='xy', mapping=list(x='X', y='Y'))); > plot.data$BrushBy <- rownames(plot.data) %in% rownames(brushedPts); > plot.data$X <- as.factor(plot.data$X); > plot.data$GroupBy <- plot.data$X; > > # Defining the plot boundaries > ybounds <- range(plot.data$Y, na.rm = TRUE); > > # Setting up the data points > plot.data <- subset(plot.data, ![is.na](http://is.na)(X) & ![is.na](http://is.na)(Y)); > set.seed(100); > plot.data$jitteredX <- vipor::offsetX(plot.data$Y, > x=plot.data$X, width=0.4, varwidth=FALSE, adjust=0.5, > method='quasirandom', nbins=NULL) + as.integer(plot.data$X); > > # Generating the plot > ggplot(plot.data, aes(x = X, y = Y, group = GroupBy)) + > geom_violin(alpha = 0.2, scale = 'width') + > geom_point(aes(y = Y, x = jitteredX), subset(plot.data, !BrushBy)) + > geom_point(aes(y = Y, x = jitteredX), data = subset(plot.data, BrushBy), color = '#FF0000') + > labs(x = 'CancerType', y = '1/2-SBSRNA4 (exprs)') + > coord_cartesian(xlim = NULL, ylim = ybounds, expand = TRUE) + > scale_x_discrete(drop = FALSE) + > theme_bw() + > theme(legend.position = 'bottom') >

Federico Marini (15:09:22): > plus, as an enhancement: for the plots where the brushing is originated, should we do something like adding a shaded rectangle for the selection?

Kevin Rue-Albrecht (15:09:52): > <!channel>i’ve would like to offer an idea: > As I’ve mentioned a couple of times, I’m co-author on a manuscript that is about to be submitted (~next 10 days) and includes some 10x data that we’ve processed “Seurat-style” (with a hint ofscater::downsampleCount). > Tomorrow, I’m giving a lab meeting where I would like to suggest to my PI adding as a supplemental a ZIP of the current version ofiSEEpreloaded with a SCE object of the data set (e.g.,.on Attach()). Obviously i would also point to the GitHub repo, but I’m sure journal would like a snapshot that doesn’t change over time as supplemental. > It’s the same data set that I’d personally be happy to share with Federico for his presentation next week, if the collaborators agree. > I think that would be a good precedent to start giving visibility to iSEE, as well as enhance the manuscript. > I would like to hear your opinions before talking to Steve (my PI). > PS: I would probably downgrade the R requirement to R≥3.4 at least for the first submission

Kevin Rue-Albrecht (15:11:23): > I’ll leave you to think while I’ll go get some dinner:slightly_smiling_face:

Federico Marini (15:12:41): > to avoid collisions of dependencies and so: what about a docker image, built on R-devel?

Federico Marini (15:12:54): > before aaron calls the SACRILEGE card:smile:

Kevin Rue-Albrecht (15:44:14): > i’ve never taken the time to learn how to make a container, but that sounds like the way to go

Kevin Rue-Albrecht (15:48:13) (in thread): > i like the idea, i’m always bothered when the brushed area disappears when the plot is refreshed, while you haven’t actually deselected anything

Kevin Rue-Albrecht (15:48:51) (in thread): > it would be nice to have a more persistent shaded rectangle

Kevin Rue-Albrecht (15:56:48) (in thread): > Indeed, i’ve seen that as well. I’ll have to look into it, it must be aroundsubset(..., BrushBy)andsubset(..., !BrushBy)

Kevin Rue-Albrecht (15:58:25): > alternatively, we could maybe submit the RDS file only (of the SCE) and point to the GitHub repo.

Kevin Rue-Albrecht (15:59:23): > “this object can be visualised interactively using iSEE (link)”

Kevin Rue-Albrecht (16:13:51) (in thread): > You know what I think they are subsetted correctly. > I think that despite the transparency, some groups have some many data points overlaid that it gives the impression of being selected

Kevin Rue-Albrecht (16:14:32) (in thread): > i’ll reduce the point size locally, to see if i can desaturate the areas and prove my point

Kevin Rue-Albrecht (16:16:01) (in thread): > Actually@Federico Marini, i don’t even need to touch the code: > just stretch the colData and geneExprs plots to 12 units of width, and you’ll see the effect disappear everywhere except the truly brushed data points

Kevin Rue-Albrecht (16:16:30) (in thread): > wanna add it to the FAQ?

Kevin Rue-Albrecht (16:18:43): > @Kevin Rue-Albrechtuploaded a file:stretching plots can desaturate misleading brush/transparency effect - File (PNG): stretching plots can desaturate misleading brush/transparency effect

Aaron Lun (17:24:56) (in thread): > This is what I was referring to when I was talking about preserving brushing memory. This is not trivial. Don’t expect it anytime soon.

Kevin Rue-Albrecht (17:25:54) (in thread): > ok. didn’t realise that’s what you meant. noted

Aaron Lun (17:26:41) (in thread): > I don’t really understand what the problem is.

Aaron Lun (17:27:20): > What am I meant to be seeing here?

Kevin Rue-Albrecht (17:27:28) (in thread): > have you tried running the EH1 data?

Kevin Rue-Albrecht (17:28:00): > you see different shades of grey, depending on the density of data points?

Aaron Lun (17:28:06) (in thread): > I’ve never run it, and I can’t do it on this computer at home.

Aaron Lun (17:28:22) (in thread): > Note that if you have enough points, transparency won’t be particularly useful. That’s a fact of life.

Kevin Rue-Albrecht (17:28:36): > (with the left arrow, you can navigate the earlier screenshots sent by Fede)

Kevin Rue-Albrecht (17:29:10): > considering his selection, only the semi-last violin should have data points selected

Kevin Rue-Albrecht (17:29:25): > 3-4 screenshots ago, you’ll see that other violins look like they have data points selected, too

Kevin Rue-Albrecht (17:30:03): > so basically, my last screenshot above illustrates that what Fede reported as an issue, is actually only an artefact of overplotting

Kevin Rue-Albrecht (17:30:31) (in thread): > no worries. just checking. see my answer in the main channel

Aaron Lun (17:30:41): > Hm. Perhaps we should set “restrict” as the default then, and add a note to the FAQ, as suggsted.

Kevin Rue-Albrecht (17:30:59): > to be fair, i do like transparency as a default

Kevin Rue-Albrecht (17:31:27): > it’s really putting the emphasis on the ‘selection’ aspect of brushing

Aaron Lun (17:31:31): > Hm…. well, maybe just a note in the FAQ.

Kevin Rue-Albrecht (17:31:37): > i was just doing that

Aaron Lun (17:32:00): > The defaults are pretty easy to change programmatically, so I’m not so worried about that.

Kevin Rue-Albrecht (17:32:24): > and this time i don’t even have to write the question myself ^^ copy-pasting from Fede’s message

Kevin Rue-Albrecht (17:35:02): > .. actually, adapting a bit ^^

Aaron Lun (17:35:02): > Oh, before I take a shower; the other thing to solve are the buttons on the LHS, which don’t seem to click properly.@Federico Mariniany thoughts?

Kevin Rue-Albrecht (17:35:41): > i discussed that with him, let me find what he said (basically, that’s its not an obvious thing)

Aaron Lun (17:35:58): > Yes, I remember it too. We may have to divert back to “UP” and “DOWN”.

Kevin Rue-Albrecht (17:36:06): > I suppose you mean the up/down arrows. I noticed that only their left side ‘clicks’

Kevin Rue-Albrecht (17:37:03): > Yeah. Not so bad either. I was actually wondering whether adding some whitespaces in the button would help. I’ll have to remember to try

Kevin Rue-Albrecht (17:37:53): > at the moment, i’m desperately throwing in a few more slides in my lab meeting for tomorrow

Kevin Rue-Albrecht (17:38:22): > anyway, I haven’t told Steve about the app yet, so i’ve got my wildcard to buy time:slightly_smiling_face:

Aaron Lun (17:38:24): > I usually just wing it.

Kevin Rue-Albrecht (17:38:52): > yeah.. he’s a bit more formal than us, unfortunately ^^

Aaron Lun (17:57:36): > I think we should have another skype before the final push to alpha. What time is everyone free?

Kevin Rue-Albrecht (17:58:18): > i agree. let me see

Davis McCarthy (17:58:19): > I’ve been getting going with Docker/Singularity containers recently so I could help with that if needed. A good way to give a snapshot ofiSEEat an early stage to go with a manuscript. The container won’t change, so that’s good for the manuscript - the container doesn’t necessarily have to make the source code available if that’s a concern but you could reference it as coming from version x.y.z. or commit XXXXXX in the GitHub repository so that people know where it came from. Then you could cite the repo for people to check out if they want to try thelatestversion of the package.

Davis McCarthy (18:00:27): > also we could add a dockerfile to theiSEErepo and have a docker container built on Dockerhub orQuay.iowhen triggered with a push to the repo - would make it easy to distribute to systems where installing software is a pain

Kevin Rue-Albrecht (18:01:10): > nice

Kevin Rue-Albrecht (18:03:40): > First of all, i’ll see tomorrow what they think about pre-releasing their (preprocessed to counts) data in this way. They might not like the idea, although it would help them just as much to keep a snapshot like this. Who knows

Kevin Rue-Albrecht (18:07:08): > if tomorrow, >3pm UK time for me; otherwise Wednesday & Thursday afternoons look fairly clear to me

Aaron Lun (18:45:43): > I can skype tomorrow as well.

Aaron Lun (18:46:19): > except at 6 - 6:30, which is another skype.

Aaron Lun (18:46:37): > see what@Federico Mariniand@Charlotte Sonesonhave available.

Davis McCarthy (18:48:39): > I could skype after 3pm Uk tomorrow and Wednesday is pretty free for me

2018-01-23

Charlotte Soneson (01:26:11): > By tomorrow, I suppose you mean today:slightly_smiling_face:I am available between 10 and 4:45 Swiss time, so I guess the option would be at 4 in that case to fit with Kevin’s availabilities. Wednesday 10-12, 1:30-4 Swiss time, Thursday until 2 Swiss time is also fine.

Federico Marini (01:38:28): > today is good for me in the afternoon

Federico Marini (01:38:41): > from 3pm german-swiss time

Federico Marini (01:39:30) (in thread): > I’d favor color then as a default brushing

Federico Marini (01:39:38) (in thread): > red is nicely popping out to the eyes

Federico Marini (01:39:45) (in thread): > to see right away what happens

Federico Marini (01:40:02) (in thread): > if more cosmetic changes are coming in the mind of the user

Federico Marini (01:40:18) (in thread): > I’d say she/he can do that afterwards

Federico Marini (03:01:04) (in thread): > I had some experience with Docker “back then”, maybe in the meanwhile things evolved somewhat differently/got easier or harder

Federico Marini (03:01:26) (in thread): > What I also think could be useful would be to make the package available as a bioconda recipe

Federico Marini (03:01:45) (in thread): > I’m in the process of getting the recipes approved for my packages

Federico Marini (03:03:09): > tomorrow is also pretty good

Federico Marini (03:03:21): > tomorrow now really means tomorrow:slightly_smiling_face:

Federico Marini (03:04:04) (in thread): > buttons: the idea of buttons that would be entirely clickable is appealing too, and better than its current status

Federico Marini (03:04:12) (in thread): > let me check if there are other options

Kevin Rue-Albrecht (04:05:40): > Sounds like today 3-3:45pm (UK) works. Shall we pencil it down? > Seems also that next couple of days offer good backup plans if we have to cancel

Kevin Rue-Albrecht (04:07:35): > I woke up early and wrote the container for color maps before breakfast. Just have to integrate it in the app now, which means simple calls to ’scale_color_*’

Kevin Rue-Albrecht (04:08:39): > I like the smell of code in the morning

Charlotte Soneson (04:09:44): > Today 3-3:45 UK time sounds good:slightly_smiling_face:

Kevin Rue-Albrecht (04:11:27): > I’ve got a morning full of seminars… so code should be done by lunch:innocent:

Charlotte Soneson (04:12:56): > I will try to get the app going on our shiny server. Most likely I’ll have to update some things (and try not to interfere with the other apps we have there in the meanwhile)

Federico Marini (04:13:37): > @Charlotte SonesonI think the main issue would be to have r-devel

Federico Marini (04:13:46): > unless (again) we commit sacrilege:smile:

Charlotte Soneson (04:15:48): > Yes. But I guess the main point here is to check that it actually runs, right (which could be done with an older R version)? The functionality can be tested locally. I would have to agree with everyone to update R, since it might break other apps…

Federico Marini (04:20:10): > Go ahead with it, as a starter we only want tosee whether it runs

Aaron Lun (04:21:36): > Okay, 3pm it is.

Federico Marini (04:22:00): > Noted

Kevin Rue-Albrecht (04:29:27) (in thread): > i’m ok with that

Federico Marini (04:30:37) (in thread): > Sorry for flagging that as a bug. I’ll elaborate a little more on my preference

Federico Marini (04:31:30) (in thread): > Color is imho the best because as a user, you do the cognitive task of selecting a group of points, and I think it is the most obvious think to expect to be ready and detect changes in other plots

Aaron Lun (04:31:53) (in thread): > Color depends on compatibility with the existing color scale, which has its own problems.

Federico Marini (04:31:58) (in thread): > if the changes go in the direction of shading out all other points, it could be misleading (especially when using as we might many samples/cells)

Aaron Lun (04:32:00) (in thread): > I would say that restrict is in fact the best default

Federico Marini (04:32:54) (in thread): > Something between color and restrict is the “least misleading”, if you pass me this definition

Aaron Lun (04:35:09) (in thread): > I don’t know what this would entail. But we’re not adding new brushing options at this point, it was a real pain to get the current setup working.

Federico Marini (04:49:03) (in thread): > Sorry, bad wording

Federico Marini (04:49:07) (in thread): > no extra option

Federico Marini (04:49:11) (in thread): > One of them

Charlotte Soneson (04:59:22): > So, everything seems to be running fine on our shiny server (with R 3.4). I just put anapp.Rscript in the app folder on the server with the following content: > > library(iSEE) > sce=readRDS("allen_sce.rds") > iSEE(sce) >

Charlotte Soneson (04:59:37): > Whereallen_sce.rdsis a saved version of the example data set

Federico Marini (05:53:24): > Cool!

Aaron Lun (06:20:55): > I’ll grudgingly admit whoever put ininitialPanelsiniSEE.Rdid an alright job.

Kevin Rue-Albrecht (06:21:21): > hahaha

Aaron Lun (06:24:16): > You will have to explain this ExperimentColorMap thing to me later. It seems much heavier than I thought it would be.

Kevin Rue-Albrecht (06:24:45): > well the class is fairly light (have you tried the example in the man page?)

Aaron Lun (06:25:03): > No, I’m just looking at the code right now.

Kevin Rue-Albrecht (06:25:31): > the integration is a bit more intricate than i thought, as i need to pass the original name of the covariate selected for color through the plotting functions

Aaron Lun (06:25:49): > Hm.

Kevin Rue-Albrecht (06:25:50): > anyway, don’t worry too much about it for now: that’s the point of a side branch

Kevin Rue-Albrecht (06:26:29): > as long as you see a PR, it means i’m not sure of myself either

Kevin Rue-Albrecht (06:27:02): > but i do like the feel of the container, as i’ve tested it

Kevin Rue-Albrecht (06:28:43): > think of it as a lazy/relaxed container: > * you store colormaps for any covariate of interest, don’t worry about the others > when you query it, it return either: > * the colormap that you defined > NULLfor discrete covariates (leave the app apply default ggplot) > viridis::viridis(10)for continuous covariates (best default to discuss)

Aaron Lun (06:29:13): > I presume there should be a check when there are more levels than colors.

Aaron Lun (06:29:36): > How doesggplothandle the colours for continuous variables - viacut?

Kevin Rue-Albrecht (06:30:02) (in thread): > scale_color_gradientn

Kevin Rue-Albrecht (06:30:20) (in thread): > and its friendscale_fill_gradientn

Kevin Rue-Albrecht (06:32:25): > bear with me for a day

Aaron Lun (06:33:02): > Okay.

Aaron Lun (06:33:30): > Meanwhile, I will try to solve the cases where the vipor offsets don’t match up with the violin.

Kevin Rue-Albrecht (06:35:13): > cool

Aaron Lun (06:39:35): > pretty sure it’s something to do with the bandwidth adjustment…

Kevin Rue-Albrecht (06:43:53): > moment of truth over here: testing a custom color scale for redDim plot for the first time

Kevin Rue-Albrecht (06:45:21): > arf.. forgot%sin mysprintf

Kevin Rue-Albrecht (06:48:10): > tadaaaaa

Kevin Rue-Albrecht (06:48:37): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-01-23 11.48.18.png - File (PNG): Screenshot 2018-01-23 11.48.18.png

Aaron Lun (06:48:48): > Fascinating.

Kevin Rue-Albrecht (06:49:19): > anyway, i’ll stop spamming the channel and finish that up to something that you guys can take for a test run

Aaron Lun (06:50:39): > Great. Also, do you have an example where the violin plot disagrees with the scatter? I remember seeing something in one of your images; see if PR 78 helps.

Aaron Lun (06:51:46): > Oh, and I broke the current master, so wait for 78 to merge.

Kevin Rue-Albrecht (06:51:57): > can’t remember a specific issue of that kind

Aaron Lun (06:54:10): > Seehttps://community-bioc.slack.com/files/U6F3QQT6V/F8XE90WJJ/screenshot_2018-01-22_16.16.20.png

Aaron Lun (06:54:10): > @Aaron Lunmentioned a file:Screenshot 2018-01-22 16.16.20.png. - File (PNG): possible demo data set

Kevin Rue-Albrecht (06:54:12): > do you mean last night’s point raised by Fede? the thing about brushing? because we agreed that’s an artefact of overplotting

Kevin Rue-Albrecht (06:54:19): > it’s the only disagreement i can remember

Aaron Lun (06:54:25): > Look at how the scatter is narrower than the violin.

Kevin Rue-Albrecht (06:57:32): > ahhh that one, i thought .scatter_plot and .violin_plot

Kevin Rue-Albrecht (06:58:21): > how to control the scatter to fit the violin layer is beyond me

Aaron Lun (07:29:09): > Well, see if the latest master is any better.

Federico Marini (08:22:09): > For the Skype call:@Davis McCarthywhat would be your username?

Aaron Lun (08:31:42): > I’m also going to add an option to choose the color when color by =“none”

Aaron Lun (08:50:25): > Annotation stuff now belongs in a separate file,@Federico Marinican you add a more graceful error message when the key is not found?

Aaron Lun (08:54:44) (in thread): > Do you have support for general coloring (i.e., the default color of points, other than black)? It would save us from having to add an explicit option for each plot.

Davis McCarthy (08:56:50): > “davis.mccarthy”

Federico Marini (09:06:37) (in thread): > Which branch is it on?

Federico Marini (09:06:45) (in thread): > defaults?

Aaron Lun (09:08:09) (in thread): > Yep, soon to be merged.

Federico Marini (09:10:55) (in thread): > I’d wait briefly then. I’m drafting a couple of presentations for the next days

Federico Marini (09:11:18) (in thread): > (one of them is about our creature here)

Federico Marini (09:11:37) (in thread): > I was thinking of a title likeiSEEing is believing

Kevin Rue-Albrecht (09:56:49) (in thread): > not just yet

Kevin Rue-Albrecht (09:57:11) (in thread): > sorry - lab meeting extended to 2h in total once i started showing them aroundiSEE

Kevin Rue-Albrecht (09:57:34) (in thread): > so i’m only picking up now where i left off at lunch time

Kevin Rue-Albrecht (10:00:07) (in thread): > I’m nearly there for the support of custom colors. Support for ‘default’ (lack of) colors probably shouldn’t be supported by the ‘custom’ system, as this is adding scales (scale_color_*). > What you want to fiddle with are the calls to the individual layers, withcolor=...outsidethe aesthetic call

Aaron Lun (10:00:37): > Skype now?

Federico Marini (10:01:08): > I’m all set

Kevin Rue-Albrecht (10:01:19): > ready to go

Aaron Lun (10:01:19): > Waiting for my mac to boot up

Davis McCarthy (10:40:17): > Are you skypeing now?

Charlotte Soneson (10:40:47): > yes. I think Federico sent a connection request to you

Davis McCarthy (10:44:55): > here if you can add me!

Charlotte Soneson (11:26:40): > Making all the up/down/discard buttons size 3 seems to make them all fully clickable…

Federico Marini (11:28:19): > I’m working exactly on that in my branch:slightly_smiling_face:

Federico Marini (11:28:33): > good thing I probably left one button sized 3

Charlotte Soneson (11:28:42): > Good, then I’ll leave it to you!

Federico Marini (11:28:47): > out of error? looking for serendipity?:smile:

Charlotte Soneson (11:29:14): > Who cares, it works:stuck_out_tongue_winking_eye:

Federico Marini (11:29:29): > Charlotte, can I put the link to the shiny server where you set up the running app?

Federico Marini (11:29:37): > in the upcoming presentation, I mean

Aaron Lun (11:30:21): > Stand by for merge fromdefaults, which contains a number of bug fixes.

Charlotte Soneson (11:32:16): > Ah, I tried it on our behind-the-firewall “try things out”-server…I’ll really have to check with everyone before I update R or point to a new library on the production server…let me see if I can make it work in time.

Federico Marini (11:34:08): > No prob, I can still demo it live in case someone asks

Federico Marini (11:34:23): > I mean, the presentation will almost be demo only

Federico Marini (11:54:23): > @Federico Mariniuploaded a file:logo_concept.png - File (PNG): logo_concept.png

Federico Marini (11:54:45): > This one is a draft of how I had it in mind

Federico Marini (11:55:31): > … and we could add it on the top left of the dashboard bar, as an icon for the app itself

Federico Marini (11:55:40): > at least only the goggles

Kevin Rue-Albrecht (12:04:09) (in thread): > @Federico Marinithink of deleting the FAQ point then when you get to the vignette

Kevin Rue-Albrecht (12:05:27): > I think it’s a good start of logo. I’ll think of suggestions later, i’m low on brainpower right now

Aaron Lun (12:38:59): > I’m happy with putting a logo in the vignette, but I’d rather not clutter the app.

Aaron Lun (12:39:46): > If you must, I would suggest putting a “ABOUT” button next to the button that open/closes the left sidebar. This could also include the acknowledgements and citation information, freeing up screen space.

Kevin Rue-Albrecht (13:38:03): > Alright. Sorry for the delay, busy afternoon even after the Skype. But I’ll do all I can to merge in thecolormapsbranch tonight

Federico Marini (14:42:53) (in thread): > The logo would go rather like in this case:

Federico Marini (14:42:54) (in thread): > https://bioconductor.org/packages/release/bioc/vignettes/TCGAbiolinksGUI/inst/doc/vignette.html

Federico Marini (14:43:15) (in thread): > up left, together with the title itself. so no clutter

Federico Marini (15:06:59): > Couple of things on the aesthetics:

Federico Marini (15:07:19): > - TCGAbiolinks also has BTW some styling o f the sidebar menu

Federico Marini (15:08:36): > they do it like here:https://github.com/BioinformaticsFMRP/TCGAbiolinksGUI/blob/6d91de8effa560ae1992662b67e3df657b886df5/inst/app/ui.R#L84-L102 - Attachment (GitHub): BioinformaticsFMRP/TCGAbiolinksGUI > TCGAbiolinksGUI code development for R/Bioconductor submission http://tcgabiolinks.fmrp.usp.br:3838/

Federico Marini (15:10:04): > - the Bioconductor color I used for the button was[color content]

Federico Marini (15:10:23): > taken directly from a point in the background of the bioc website

Federico Marini (15:11:00): > BiocStyle still has different choices - at least for the vignettes:https://github.com/Bioconductor/BiocStyle/blob/18c0e098854fc87a10e760cf16a5dba5c29c2b18/inst/resources/html/bioconductor.css#L114-L128 - Attachment (GitHub): Bioconductor/BiocStyle > Issues and pull requests for BiocStyle should go here.

Kevin Rue-Albrecht (16:01:25): > We kinda brought up in the Skype that the dimRed plot relies on the availability of thereduceDimslot… which meansSingleCellExperimentobject. Did we land on a decision whether we ‘turn off’ that plot if we get aSummarizedExperiment, or should we simply claim that we supportSingleCellExperimentin the end?

Kevin Rue-Albrecht (16:38:29): > I’ll have to point out that last week I did insertstopifnot(inherits(se, "SingleCellExperiment"))at the very start of theiSEEfunction, to avoid bad surprises with the dimRed plot. We may want to remove it when we’re sure that we handleSummarizedExperimentproperly. > I have just tested what happens if we launch the app with an SCE object with an empty reduceDim slot, and it does not look good:Warning: Error in seq_len: argument must be coercible to non-negative integer

2018-01-24

Aaron Lun (04:53:12): > The fixes should have fixed that.

Aaron Lun (04:55:00) (in thread): > The space we currently have is probably too small to see anything but the simplest logo.

Kevin Rue-Albrecht (04:58:17): > Ok thank. i’ll check soon

Kevin Rue-Albrecht (05:00:08): > (#)random: if we want to mess with the users, we can coin as ‘3D plots’ the density-dependent downsampled plots

Aaron Lun (05:01:34): > ?

Aaron Lun (05:02:04): > Well, I thought a more amusing way to confuse people would be to call our factr X/Y plots “boxplots”.

Aaron Lun (05:02:20): > User: “how do you visualize two factors against each other?”

Aaron Lun (05:02:28): > Me: “Oh, we use boxplots.”

Aaron Lun (05:02:32): > User: “???”

Kevin Rue-Albrecht (05:55:14): > late comeback: it was a nice out-of-the-box idea

Aaron Lun (08:36:13): > Using shinyjs to disable buttons; this is really sweet.

Aaron Lun (08:36:18): > Check outhardened.

Aaron Lun (08:36:33): > Will continue after I get back from some PhD talks that I need to attend.

Federico Marini (09:44:08): > colormap team, do we need to specify the import from Rcolorbrewer too?

Kevin Rue-Albrecht (09:49:05): > ah. maybe not theimportFromstatement inNAMESPACE, given that I used::in the example codeRColorBrewer::brewer.pal(3, "Set2")

Kevin Rue-Albrecht (09:49:48): > Give it a try without (R CMD check) and see if it fails. I can’t think which way is correct right now

Federico Marini (09:52:58): > failing does not occur

Federico Marini (09:53:45): > but I am just thinking that the package should be present. it is for most of us, but I don’t know if this is the case also on the CI machines. Likely yes, as it is a common dependency

Federico Marini (09:53:59): > So I also do not know wjhat the desired approach should be

Federico Marini (09:54:13): > better call@Aaron Lun`?

Kevin Rue-Albrecht (09:55:43): > Cool, thanks for checking. I’m meeting candidates for PhD studentships ATM

Federico Marini (09:56:24): > noproblemo

Federico Marini (09:56:30): > I’m deep in vignetting

Aaron Lun (10:14:51): > Probably should import Rcolorbrewer, just like I import vipor::offsetX even though I don’t really need to.

Aaron Lun (10:18:51): > Hey, someone got rid of myresetOnNew=TRUEcommand. That was why the brushes weren’t disappearing yesterday.

Federico Marini (10:32:27): > If it was me, was not on purpose & if so, sorry in advance

Aaron Lun (10:44:21): > No worries, I’m not going to point fingers.

Aaron Lun (10:44:28): > That’s whatgit blameis for:slightly_smiling_face:

Aaron Lun (10:45:25): > @Kevin Rue-AlbrechtLooks like assay color map is incorrectly called when coloring by coldata. Refactoring now to centralize color choices…

Federico Marini (10:53:18): > eheheh

Kevin Rue-Albrecht (11:22:35): > oopsiedaysies.. 1 copy-paste too many.. i thought i fixed all of those.

Aaron Lun (11:33:32): > Major clean-up to colormap incorporation inplotting.Rinhardened. See if it makes sense to you.

Kevin Rue-Albrecht (11:34:45): > ok thanks.

Aaron Lun (11:36:05): > Note thecolor_FUN, which is a function that generates a command containing theggplotscale_color_*function. All relevant information is effectively embedded in the function closure.

Kevin Rue-Albrecht (11:39:01): > That sounds absolutely perfect. I’ll check it out in detail later this evening.

Aaron Lun (11:47:43) (in thread): > The interface will now be sane when there are no reduced dimension assays, so it is fine to coerce SE objects into SCE objects with empty assays.

Aaron Lun (13:14:25): > Too grumpy right now to review a paper, so will begin the refactoring from hell - to separateplot.datageneration from the actual plotting commands.

Kevin Rue-Albrecht (13:20:23): > woot woot

Aaron Lun (13:26:00): > This is going to hurt. No one touch anything inplotting.Rfor a while. I WILL finish this tonight.

Aaron Lun (13:46:36): > Harder than I thought. It’s not just a case of separating them out, creating all theplot.data, and then creating the plots; this is because theplot.datawill depend on the brushing when restricting, so it may not be possible to define all of theplot.datain the given order of plots. So I would still have to find an overall parent panel.

Aaron Lun (14:46:31): > It is done.

Federico Marini (14:50:15): > I still think John got you for your looks

Federico Marini (14:50:57): > but there seems to be a skill portion which is not to be straightforward hidden:slightly_smiling_face:

Federico Marini (14:51:02): > great job:slightly_smiling_face:

Aaron Lun (14:51:53): > The graph structure incodetrack.Rwill be similar to what we will be using for the brush memory, to push changes in brushing to upstream plots in order to update downstream plots.

Federico Marini (14:59:07): > are you about to merge it already into master? if so, I could already merge it into our vignette draft version

Federico Marini (15:50:57): > One thought that crossed my mind right now talking to Charlotte

Federico Marini (15:51:20): > I think it is a pity we did not apply for any funding for this

Kevin Rue-Albrecht (15:52:11): > where could we have applied for funding, for a sort of mini-project like that?

Federico Marini (15:52:34): > no idea. and especially with our tight time frame that we chose to stick to

Federico Marini (15:52:41): > I mean not for the money per se, but damn this thing came out damn good

Kevin Rue-Albrecht (15:53:07): > true - we would have finished the app before the application was even reviewed xD

Federico Marini (15:53:11): > as charlotte said, often life scientists do apply for things that are there at >90% completion

Kevin Rue-Albrecht (15:53:28): > i see your last point

Kevin Rue-Albrecht (15:53:50): > rolling on something that’s already working to fund the next one

Federico Marini (15:53:52): > I don’t know if we can fix it. Or somehow, get something more than mere glory out of it:stuck_out_tongue:

Kevin Rue-Albrecht (15:54:34): > although it would open all sorts of other complications, given that we’re all from different labs and places

Federico Marini (15:56:08): > also true. but I felt it was a small missing piece

Federico Marini (15:56:18): > again, not that it would have been the primary motor

Federico Marini (15:56:37): > would have been a kind of official seal on the co-op

Kevin Rue-Albrecht (15:56:51): > i totally agree with this

Kevin Rue-Albrecht (15:58:12): > i personally joined the fun for the mere glory out of it, as you say, knowing we’re contributing to the community a solid tool that consolidates our combined expertise

Federico Marini (16:02:01): > exactly, that brought a nice amount of fire within

Federico Marini (16:02:07): > good starter for 2018

Kevin Rue-Albrecht (16:03:57): > but in any case, we’ll have to formalise the co-op at some point when it gets to the manuscript. I don’t know exactly how our respective PIs will deal with that

Kevin Rue-Albrecht (16:04:33): > “dammit, we left our postdocs on the loose again”

Kevin Rue-Albrecht (16:44:20) (in thread): > @Aaron Lunyes there should be. > I’ll implement a method in theExperimentColorMapclass that take aSEand anECMobjects and that checks them for compatibility/discrepancy. > I’ll place that check among the first things that are done when launching the app, and throw an error/close the app if the test fails.

Kevin Rue-Albrecht (16:46:20) (in thread): > I must admit that I’ve invested a significant amount of time on iSEE recently (everyone has), and I need to catch up with local duties tonight

Aaron Lun (17:09:15): > I can’t imagine that our PIs would want in on the manuscript.

Aaron Lun (17:10:20): > I mean, with this kind of thing, every author had better be contributing code.

Aaron Lun (17:10:46): > The ideas guy can get behind the ideas guy who can code.

Kevin Rue-Albrecht (17:11:56): > eh.. i understood everything…. except the last bit:sweat_smile:

Aaron Lun (17:12:00) (in thread): > Just get colormap to a functional state, and I’ll handle the rest.

Aaron Lun (17:13:10): > Well, some people justify their presence on projects by saying that they contributed ideas. But ideas are cheap, it’s getting them to work that counts.

Kevin Rue-Albrecht (17:14:30): > agreed

Aaron Lun (17:14:53): > On an unrelated note, I talked to John last night about the iSEE manuscript and confirmed that he won’t be in the author list. Not that it really matters, I do this on my free time anyway, so I could well argue that he doesn’t pay me anything for this.

Kevin Rue-Albrecht (17:15:27): > i’m thinking the same here

Aaron Lun (17:15:30): > “Free time” being a somewhat liquid commodity in my world.

Kevin Rue-Albrecht (17:18:45): > it’s just that last time I submitted an application note to Oxford Bioinformatics (rejected, needless to say), it was costly enough to involve my PI

Aaron Lun (17:18:57): > Moneywise?

Kevin Rue-Albrecht (17:19:03): > yep

Aaron Lun (17:19:08): > Meh.

Aaron Lun (17:19:19): > UCam has open access things that pay for it.

Aaron Lun (17:19:33): > And I can beg some money off John.

Aaron Lun (17:19:40): > It’s not a problem.

Kevin Rue-Albrecht (17:19:54): > hahaha ok then

Kevin Rue-Albrecht (17:20:13): > anyway, i don’t want to get ahead of myself

Aaron Lun (17:20:38): > It’s good to discuss authorship ahead of time when everyone’s still got a cool head.

Aaron Lun (17:21:31): > I don’t care about the rest of the author order, as long as I’m last and corresponding.

Kevin Rue-Albrecht (17:21:36): > yep, we’ll have to gather everyone though, i see lights are on on the left, but that doesn’t mean everyone’s listening in

Aaron Lun (17:22:18): > It’s going to be an equal-first business for all of you guys anyway, so it’s just a matter of who gets the “et al.”

Aaron Lun (17:22:44): > And by “guys” I mean that in a gender-neutral way.

Kevin Rue-Albrecht (17:22:48): > what i have really enjoyed about this business of ours is that i could really feel everyone in for the glory of a good app

Aaron Lun (17:22:48): > Obviously.

Kevin Rue-Albrecht (17:23:01): > not for authorship, as is so common these days

Aaron Lun (17:23:11): > Oh…:sweat:

Aaron Lun (17:23:40): > Well, as I rack up more corresponding authorships, I’m going to get fewer ego-satisfying “Lun et al.”s

Kevin Rue-Albrecht (17:23:47): > hehehe

Aaron Lun (17:23:57): > sigh

Kevin Rue-Albrecht (17:23:59): > i’m so sorry that we’ll take that away from you

Aaron Lun (17:24:18): > I mean, what’s the point if I don’t see my name being cited?

Kevin Rue-Albrecht (17:24:18): > we’re contributing to your demise xD

Aaron Lun (17:24:52): > I mean, if the journals are using a reference sstyle that only shows three authors, I’ll be the only one in the “and others”.

Kevin Rue-Albrecht (17:25:03): > lol

Kevin Rue-Albrecht (17:25:49): > the other silly thing that crossed my mind was whether we could set the record for the paper with the largest number of “these authors contributed equally”

Aaron Lun (17:26:12): > I’m pretty sure those consortium papers go to 5 or more.

Kevin Rue-Albrecht (17:26:41): > but honestly, Fede already said it few times, but kudos on the infrastructure

Aaron Lun (17:26:42): > God, don’t get me started on the HCA Hackathon paper that I’ve got in prep.

Aaron Lun (17:27:00): > I mean, every partipicant is an author? Screw that.

Kevin Rue-Albrecht (17:27:26): > did i miss much?

Kevin Rue-Albrecht (17:27:46): > (might take this to our own conversation if we’re going off track)

Aaron Lun (17:29:02) (in thread): > I can only see suffering in that direction.

Aaron Lun (17:30:34) (in thread): > It would be an administrative nightmare involving 4 different institutions and pay schemes.

Aaron Lun (17:31:56) (in thread): > We wouldn’t be asking for more than 20% time from each of us, for maybe a few months; probably not over 20K GBP in total, including indirects. Very few funding streams for that kind of stuff, especially for a pure computational project.

Aaron Lun (17:33:46) (in thread): > And seriously, it would take less work to do it than to apply. I applied to the BBSRC once and ended up finishing the roposed work before I got the decision back (rejected, of course).

2018-01-25

Charlotte Soneson (01:25:21): > I am on board with everything you said about the authorship yesterday night. And in the end I feel like I probably contributed less critical insights than you guys, so I’m not going to fight for the first position:slightly_smiling_face:

Charlotte Soneson (01:25:43): > And for the largest number of “These authors contributed equally”, I already have a paper with 9…

Federico Marini (03:01:07): > Hopping in: I also think my Chefin as well as my mentors do not want to be in the author list

Federico Marini (03:01:21): > not even their ideas went in so:stuck_out_tongue:

Federico Marini (03:02:03): > for the fees, I am aware there are some fundings for paying the OA part also at my university

Federico Marini (03:05:55) (in thread): > For this I totally agree. The win is probably not worth the effort

Federico Marini (03:06:35) (in thread): > I’m glad it went pretty smooth. And I got to learn a lot. So for me, WIN

Federico Marini (03:06:37) (in thread): > :slightly_smiling_face:

Kevin Rue-Albrecht (03:20:25): > a voice from the heavens? - Attachment: Attachment > Here’s a sidebar theme with bioconductor colors for anyone interested :smile: #4390A7,#076570,#A2C353,#404042,#86A645,#FFFFFF,#F79F66,#F15340

Kevin Rue-Albrecht (03:26:35): > i’ll pass the word to Steve about the plan for author list; so far the the excitement was more about getting it to run on our cluster… and other immediate deadlines about manuscripts to be submitted:sweat_smile:

Kevin Rue-Albrecht (03:28:07): > also, looking for open access publishing support in Oxford, I foundhttp://openaccess.ox.ac.uk/wellcome-and-coaf/but i need to check whether it applies to me (Steve pays me from a WT strategic award, but ‘The policy applies to researchers in Wellcome Trust Centres.’ and I am in the Kennedy Institute, right next door to the WTCHG) - Attachment (openaccess.ox.ac.uk): Wellcome Trust and Charity Open Access Fund (COAF) > Current Policy What do I do at Oxford? Oxford has received a Wellcome/COAF block grant for 1 October 2017 to 30 September 2018 to

Kevin Rue-Albrecht (03:28:22) (in thread): > @Federico Marini

Federico Marini (03:30:48) (in thread): > hello there:smile:

Aaron Lun (04:51:13): > I’m wondering whether we should just import the whole of shiny.

Aaron Lun (04:51:31): > I think someone mentioned this earlier, but now seems like the right time to re-examine this.

Kevin Rue-Albrecht (04:51:42): > what % of their functions do we have? ^^

Aaron Lun (04:51:50): > Not sure, but the improtFrom list is getting pretty big.

Kevin Rue-Albrecht (04:52:34): > From experience, the most notorious conflict I’ve encountered with that is thecolumnfunction that collides withAnnotationDbi,ensembldband their friends

Aaron Lun (04:52:51): > Hm.

Aaron Lun (04:52:57): > Well, we importcolumnanyway.

Kevin Rue-Albrecht (04:53:17): > Don’t quote me on this, but I believe our current long list ofimportFromis best practice

Kevin Rue-Albrecht (04:53:44): > i’m rushing to finish up stuff before a meeting in 5 min, so i’ll leave you guys to discuss it

Kevin Rue-Albrecht (04:53:53): > just wanted to throw my 2 cents in

Aaron Lun (04:54:10): > Well, that’s fine with me too.

Aaron Lun (05:56:36): > Note that, when creating the plotting commands to evaluate, use: > > sprintf("blah <- %s", deparse(some_arbitrary_string)) # good > sprintf("blah <- '%s', some_arbitrary_string) # not so good > > as the former will protect against existing quotes and escapes while the latter will not. This is only necessary in cases where the string is not known in advance - we can control the internally defined variables, so there’s no need to do this e.g. when building theaesobject.

Aaron Lun (05:57:11): > I’ve implemented this throughoutplotting.Rbut I may have missed some spots.

Aaron Lun (06:48:29): > Color-coding is done. A bit of persistent whitespace between rows, not entirely sure how to get rid of it.

Aaron Lun (06:49:03): > The coloring of the LHS boxes is also a bit funny as the “Width” label redners white for some reason.

Federico Marini (06:49:09): > probably too deep hard-coded in the box properties and organization?

Aaron Lun (06:49:20): > Perhaps.

Aaron Lun (06:49:31): > Play around with it and see what you can do.

Federico Marini (06:49:47): > I tend to like it with boxes

Federico Marini (06:50:03): > makes it this modern touch - which nowadays we see almost everywhere, but well

Kevin Rue-Albrecht (08:55:19) (in thread): > at the latest this weekend, hopefully tonight

Kevin Rue-Albrecht (08:56:02) (in thread): > everyone’s on edge here about a manuscript about to be submitted to Immunity:sleepy:

Kevin Rue-Albrecht (08:59:55) (in thread): > … i’ll probably have my tongue cut for even telling you that:wink:

Aaron Lun (09:00:29) (in thread): > lol

Aaron Lun (09:00:48) (in thread): > well, check out the latest UI for some stress release.

Kevin Rue-Albrecht (09:01:09) (in thread): > ok, i was installing the latest pull in the background

Kevin Rue-Albrecht (09:01:16) (in thread): > didn’t have igraph on the desktop

Kevin Rue-Albrecht (09:02:20) (in thread): > oh ffs: error during install: > > **** testing if installed package can be loaded > Error: package or namespace load failed for 'igraph' in dyn.load(file, DLLpath = DLLpath, ...): > unable to load shared object '/Library/Frameworks/R.framework/Versions/3.5/Resources/library/igraph/libs/igraph.so': > dlopen(/Library/Frameworks/R.framework/Versions/3.5/Resources/library/igraph/libs/igraph.so, 6): Symbol not found: __ZNKSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEE5rfindEcm > Referenced from: /Library/Frameworks/R.framework/Versions/3.5/Resources/library/igraph/libs/igraph.so > Expected in: flat namespace >

Kevin Rue-Albrecht (09:02:33) (in thread): > i had a similar error trying to updatescaterrecently

Kevin Rue-Albrecht (09:03:07) (in thread): > Davis helped me: it was just about re-installing RHdf5Lib and beachmat

Kevin Rue-Albrecht (09:03:28) (in thread): > i’ll google this one again, except if you know already?

Aaron Lun (09:03:45) (in thread): > Sounds like you were running two installs at the same time.

Aaron Lun (09:03:55) (in thread): > Just re-install igraph, I guess.

Kevin Rue-Albrecht (09:04:10) (in thread): > weird, I just calledinstall.packages("igraph")

Kevin Rue-Albrecht (09:04:15) (in thread): > i’ll try again though

Aaron Lun (09:04:45) (in thread): > This’ll happen if you run install in one session and try to load the package in another befoer the install has finished.

Kevin Rue-Albrecht (09:05:14) (in thread): > running another install now, i’ll let you know

Kevin Rue-Albrecht (09:09:20) (in thread): > dammit. no it’s doing it again

Kevin Rue-Albrecht (09:09:40) (in thread): > i’ve update the bug report above with an extra line

Kevin Rue-Albrecht (09:10:00) (in thread): > extra 3 lines now

Kevin Rue-Albrecht (09:10:25) (in thread): > btw, I also tried in a fresh R session, after closing RStudio

Aaron Lun (09:13:12) (in thread): > I’m going to guess that you’re using conda or homebrew something like that.

Kevin Rue-Albrecht (09:13:33) (in thread): > mah, i’ll figure it out over the afternoon, might be calling the wrong gcc (/usr/local/bin/gcc-7) of something stupid like that

Aaron Lun (09:14:32) (in thread): > The error message indicates that it’s failing to link. This would be because the libraries it’s linking to were compiled with a different version of GCC compared to the one you’re using now.

Kevin Rue-Albrecht (09:14:47) (in thread): > lol nevermind: > I managed to install it with an R prompt in my console > …. just another RStudio quirk

Aaron Lun (09:59:47): > Okay, moving onto brushing memory. This shit is going to get real.

Kevin Rue-Albrecht (10:01:08): > just launched the app built from the latest master: it is beautiful

Kevin Rue-Albrecht (10:01:18): > can’t wait to get the colormap sorted

Kevin Rue-Albrecht (10:01:59): > i just found a reminder that I wrote last night: is there any step that we would like to add aprogressBarfor yet?

Kevin Rue-Albrecht (10:03:53): > shiny::withProgressfunction

Aaron Lun (10:03:54): > Not yet, not to my knowledge unless something is being ridiculously slow.

Aaron Lun (10:03:59): > Possibly the startup, but that’s about it.

Kevin Rue-Albrecht (10:04:45): > Ok then. I wouldn’t recommend one for the start up

Aaron Lun (10:24:22): > God, this brushing memory is painful. So many ways to go horribly wrong.

Kevin Rue-Albrecht (10:27:55): > “the higher the climb …” > I’ll just shut up ^^

Aaron Lun (10:54:32): > It seems easier to just leave zooming and brush transmission on by default; otherwise we would have to re-render whenever anyone presses those buttons.

Aaron Lun (10:54:48): > I hope that this won’t result in a big impact on performance - probably not, given that zoom is already on by default anwyay.

Kevin Rue-Albrecht (11:06:09): > @Federico Marinicorrection - Attachment: Attachment > @David Jenkins actual colors are at http://bioconductor.org/about/logo/

Kevin Rue-Albrecht (11:19:19): > <!channel>I informed Steve of our plans for the manuscript, and the fact that none of your group leaders have asked to be on the author list. Nevertheless, as I am a postdoc in his group, and have dedicated a significant portion of my recent daily work time to iSEE, he would like to request that his name appears as a co-author. > Now, he explicitly said that he is absolutely not going for the last author position. Aaron more than deserves it. > I get where he’s coming from: he has to justify the time I spend as one of his group members. I have tried to keep it to out-of-hours, but I have to admit that it escalated quickly when I attackedggplotaspects. > Thinking about this, I wonder whether you would all be ok placing him as semi-last author?

Aaron Lun (11:19:39): > What

Kevin Rue-Albrecht (11:20:05): > (don’t kill the messenger)

Kevin Rue-Albrecht (11:30:20): > I’m sorry for the situation. Call me naive, but I genuinely was not expecting that

Federico Marini (12:43:48) (in thread): > I do not have benchmarks, but I think there is not that muc h of extra overhead for transmitting the brush

Federico Marini (12:44:39) (in thread): > that said, I’d also leave it on automatically. It is the beauty of linking, and that could be ideally delivered b default. nothing happens in the other plots anyway, until the brush is sent over

Federico Marini (12:48:49) (in thread): > (if we take the check out, i’ll edit accordingly the tour:wink:)

Kevin Rue-Albrecht (14:33:50): > Ehm. > Actually, Steve just let me know that he does not need to be author anymore on this one, he apologises for the mis-communication.

Aaron Lun (15:01:07): > Oh. Good.

Federico Marini (15:02:20): > stepping in now. I also think it avoids “problems”, as this creature is kind of really our thing

Federico Marini (15:02:54): > one thing if say, the PIs had the same idea we had, and then put us to work

Federico Marini (15:12:22): > -> ideas for eventual DT::datatable pimping:

Federico Marini (15:12:23): > https://rstudio.github.io/DT/extensions.html

Federico Marini (15:12:35): > do you see something we could conveniently add?

Federico Marini (15:13:01): > I fancy the scroller and the button to export

Aaron Lun (15:17:06): > Hmm.

Kevin Rue-Albrecht (15:17:17): > i already don’t get the autofill. Nevermind, I didn’t realise immediately that it was a demonstration page: I found how to play with it:sweat_smile:… this thing with Steve today got me all upside down

Aaron Lun (15:17:37): > The scroller is nice but it will automatically reset to the top after re-rendering.

Aaron Lun (15:17:46): > That’s maybe not so bad, but something to keep in mind.

Aaron Lun (15:18:01): > The export button… well, might be useful for data hosted on a server.

Aaron Lun (15:18:27): > Okay, I’m going offline for dinner.

Federico Marini (15:21:23): > export I started adding it to all my reports with datatables in it

Kevin Rue-Albrecht (15:22:06) (in thread): > Exactly. Aside from the ‘who would go last’ thing that would arise, involving PI would slow down thing soooo much, I’m sure

Kevin Rue-Albrecht (15:23:48) (in thread): > They might as well be users (know enough about genomics to use it, don’t have enough time to contribute code), and feed back through issues like everyone else.

Kevin Rue-Albrecht (15:35:45): > btw, even though it would only cause a 1-line conflict: i’m taking the initiative to subsitutestopifnot(inherits(se, "SingleCellExperiment"))byse <- as(se, "SingleCellExperiment")on a new branch

Kevin Rue-Albrecht (15:36:06): > branch that i’ll use to fix the last colormap bugs

Aaron Lun (16:09:27): > I would suggest regularly merging withhardened, just to keep abreast of the brushing memory changes; as these will touch pretty much everything.

Aaron Lun (16:09:53): > Full support for brushing memory will not be possible untilhttps://github.com/rstudio/shiny/issues/1456is available. - Attachment (GitHub): Set ggplot2’s plot brush programmatically Shiny · Issue #1456 · rstudio/shiny > So there is a blue semi-transparent brush/rectangle that you can drag and then move on ggplot2 with your mouse, you can get its xmin, xmax, ymin and ymax by observing the brush. How can I do the ot…

Aaron Lun (16:10:19): > However, we can do a poor man’s approximation that should be satisfactory until that comes along.

Kevin Rue-Albrecht (16:10:21): > thanks for the reminder, about merging, forgot to check how many open branches

Kevin Rue-Albrecht (17:16:43): > i’ll have to think more carefully about the hierarchy of colormaps this weekend. it’s a bit more work than it looks

Aaron Lun (17:22:00): > Wasn’t theassays/all_assays/globalidea good enough?

Aaron Lun (17:23:39): > GivenassayColorMap(ecm, i), if you can’t findiinassaysby character or integer, tryall_assays; and if no continuous/factor has been specified there, tryglobal; and if still you find nothing, use the defaults.

Aaron Lun (17:24:31): > It would be nice if you could allow expressions as list elements, to avoid having code chunks with an expandedviridis::viridis(100)

Kevin Rue-Albrecht (17:28:43): > maybe i’m just tired, but why do we need anall_assays? why not straight todefault?

Aaron Lun (17:29:18): > If you want different colors for assays and coldata, for example.

Aaron Lun (17:29:24): > Different default colors.

Kevin Rue-Albrecht (17:29:40): > also, you got me worried thinking that there may be non-numeric assays, so the default can’t just be a continuous scale anymore

Aaron Lun (17:29:48): > Well, that’s entirely possible.

Aaron Lun (17:29:56): > And it’s totally fine.

Aaron Lun (17:30:18): > Just make sure the validation method (on the ECM + the SE) handles it properly.

Aaron Lun (17:32:40): > And you don’t even need to check whether something is discrete or not; I’ll handle that.

Kevin Rue-Albrecht (17:32:43): > yep - i was thinking about implementing this one after fixing the current bugs, but maybe implementing the validation method first will save me some glitches downstream

Kevin Rue-Albrecht (17:32:50): > ahhhh you will?

Aaron Lun (17:32:53): > Yes.

Aaron Lun (17:33:00): > That’s part of the refactoring inplotting.R.

Aaron Lun (17:33:28): > You just need to give meassayColorMap(..., discrete=TRUE)or something.

Kevin Rue-Albrecht (17:34:11): > that’s what was splitting my head: i didn’t get how to handle discrete/continuous anymore when fetching the colormap, as the function is not aware of that information anymore

Kevin Rue-Albrecht (17:34:17): > ok, i’ll have a better look

Aaron Lun (17:34:51): > See thecolor_FUNargument passed out ofprocess_colorby_choice.

Aaron Lun (17:35:26): > Well, the discrete/continuous information wouldn’t have been available for the col data anyway.

Kevin Rue-Albrecht (17:38:08): > ok, i saw thecolor_FUN(and your earlier message about it), but it didn’t sink it yet, getting there

Kevin Rue-Albrecht (17:39:47): > ahhhhhhhhhhhhhh !

Kevin Rue-Albrecht (17:40:18): > i saw you were returning a function (obviously) but i just got the power of it now!

Kevin Rue-Albrecht (17:41:06): > those good looks will take you far, my friend

Aaron Lun (17:41:34): > your goddam right they will

Kevin Rue-Albrecht (18:24:28): > what’s you difference betweenall_assays/global?

Aaron Lun (18:27:09): > I was thinking if someone wanted to define their own continuous/discrete colors for all the assays, but only the assays; and use the built-in defaults for the colData. The same applies forall_coldata.

Kevin Rue-Albrecht (18:28:06): > That’s what I was getting at, theall_coldata. As I started picturing your thought process for assayData, I realised that you implied it for the others too

Kevin Rue-Albrecht (18:28:54): > isn’t that overkill? i get the point, but i wonder how many users will go to that depth

Aaron Lun (18:29:05): > Maybe, maybe not. I don’t really know.

Aaron Lun (18:29:21): > Power users would want it, though.

Aaron Lun (18:29:44): > And if you’re going to set up a hierarchy anyway, it’s just anotherelse ifstep.

Kevin Rue-Albrecht (18:30:08): > i know that once defined, the colormaps will be objects that can be saved and reloaded, it’s only a one-off cost

Aaron Lun (18:30:49): > I reckon it would be worth the effort to just do it now; avoid being asked for it later.

Aaron Lun (18:30:58): > I’m sure I

Aaron Lun (18:31:21): > ’m not theonly one who would think “gee, I want something in the middle between defining something for each assay/col data and everything.”

Kevin Rue-Albrecht (18:31:35): > indeed

Aaron Lun (18:32:16): > And you can just reuse the validity checks onglobalforall_assaysandall_coldata, because it’ll be the same sort of thing (a list withcontinuousanddiscrete.

Aaron Lun (18:32:17): > )

Kevin Rue-Albrecht (18:33:11): > ok, and thenglobalis a sort of user-defined default (one that they can leave toNULL), while the actual default is something that we hard-code as an ultimate failsafe?

Aaron Lun (18:33:16): > Yes.

Aaron Lun (18:36:33): > Note that every element ofassayswould need to be a list of two elements (withcontinuousand/ordiscretespecified), as the ECM doesn’t know the nature of these thingies.

Kevin Rue-Albrecht (18:37:03): > Ok, last barrier then is for discrete covariates: Even if we supply the defaultcolors, the colormap has no way of knowing how manylevelsneed to be given a color, nor what the name of those levels is

Aaron Lun (18:37:40): > Well, that relies on the user not giving us 4 colors when he/she has 5 levels in the data.

Aaron Lun (18:38:08): > I mean, how were we doing it before?

Kevin Rue-Albrecht (18:38:16): > i wasn’t thinking about this, i’m saying when they don’t supply any colormap

Aaron Lun (18:38:35): > Pass a function rather than an actualized vector of colors.

Kevin Rue-Albrecht (18:38:53): > in that case, I was not writing anyggplotinstruction, to let the ggplot defaults take over

Aaron Lun (18:38:58): > i.e., a function that accepts a number of levels and returns a number of colors.

Kevin Rue-Albrecht (18:39:15): > yeah you’re right - a sort of colorRamp

Aaron Lun (18:39:43): > It has to be deparsable, so keep that in mind.

Kevin Rue-Albrecht (18:39:52): > i’ll figure something out

Aaron Lun (18:40:27): > Arguably we should do something similar for the continuous colors, avoiding printing out all elements of a 100-color vector.

Kevin Rue-Albrecht (18:40:37): > all i’m saying is that continuous colormaps are naturally easier: you only need to give a vector colours and it will interpolate between the breaks

Kevin Rue-Albrecht (18:40:54): > categorical colormaps require the levels to which each colors are assigned

Aaron Lun (18:41:16): > Does it need the name of the levels? Or just the number of levels?

Kevin Rue-Albrecht (18:41:53): > well, if you supply a colormap, it needs to have the name of the levels (named vector: value = colour, name = level)

Aaron Lun (18:42:28): > So this is aggplotrequirement? Sounds like a pain.

Aaron Lun (18:42:36): > Doable but a real pain.

Aaron Lun (18:42:46): > Well, a minor pain.

Aaron Lun (18:42:57): > Have to replacecolor_discretewith the actual vector of colors

Aaron Lun (18:43:15): > Then have to deparse it to create a vector definition that is fed into the colorRamp.

Kevin Rue-Albrecht (18:45:19): > what i was thinking was maybe let users define a loooong vector of colors, let’s call itglobal_discrete. When appropriate, the colormap would return that one, but it would then be the responsibility of the calling function to take the first N colors as needed, put the labels/levels on them, and use that as colormap

Kevin Rue-Albrecht (18:47:36): > actually, you’re right again: > > library(ggplot2) > mycolors <- c("blue", "red") > df <- data.frame(x = letters[1:2], y = 1:2) > ggplot(df) + geom_point(aes(x,y,colour=x)) + scale_color_manual(values = mycolors) > ggplot(df) + geom_point(aes(x,y,colour=x)) + scale_color_manual(values = rev(mycolors)) >

Aaron Lun (18:48:02): > Yeah, happens every now and then.

Kevin Rue-Albrecht (18:48:11): > you can give unlabelled colours, and it will just assign them to levels in arbitrary order (levels/alphabetical)

Kevin Rue-Albrecht (18:49:26): > thanks to iSEE, i’m learning again how to handle defaults. I mean I usually build my ggplot calls manually, so I don’t leave much to defaults

Kevin Rue-Albrecht (18:51:59): > OK.. just remains the scenario where none of the discrete colormaps have enough colors to cover all levels. But I already set a cutoff on the number of levels before coercing the covariate to numeric, 24. I’ll just figure out a good discrete colormap with that many colours.

Aaron Lun (18:54:16): > If you require functions rather than color vectors, that shouldn’t be a problem…

Aaron Lun (18:54:41): > heat.colors,topo.colors, etc.

Kevin Rue-Albrecht (18:54:55): > yeah - i was also bothered by the long vectors of colors in the modal script

Kevin Rue-Albrecht (18:55:48): > I took that ugly shortcut to implement a proof of concept, because i was really short on time this week

Aaron Lun (18:56:17): > Technically they’d need to passexpression(heat.colors).

Kevin Rue-Albrecht (18:56:26): > big day tomorrow too, so I’ll ask you all to bear with me til this weekend, before I push anything

Aaron Lun (18:58:04): > Though we could just define the colormap at the top of the reproduced code, and do something likeassayColorMap(color_map, "counts", discrete=TRUE)(10)without the need to try to preserve the original name of the function (which might not even exist).

Aaron Lun (18:58:53): > This would require an explicit ECM object for the default settings, but that’s probably easy.

Kevin Rue-Albrecht (19:00:05): > Glad we discussed it. I’d have gone into a thousand deadends tonight

Kevin Rue-Albrecht (19:00:38): > It’ll just require some proper planning. I think it’ll be the last big hurdle before the (first) finish line

Kevin Rue-Albrecht (19:01:59): > …or do you still have some brushing to figure out? can’t remember if your branch is ready

Aaron Lun (19:02:37): > I aim to get the brushing memory finished tomorrow in one big push.

Aaron Lun (19:02:53): > Laid the groundwork for it today, so everything is more-or-less ready to go.

Kevin Rue-Albrecht (19:04:59): > Alright then. I’ll go get some sleep, make people happy at work tomorrow, and earn my Saturday to finish off the colormap.

2018-01-26

Kevin Rue-Albrecht (02:30:18): > If anyone is interested, I’ll be using the following example to develop and test the colormap fixes: > > library(SummarizedExperiment) > ?SummarizedExperiment > > nrows <- 200; ncols <- 6 > counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows) > rowRanges <- GRanges(rep(c("chr1", "chr2"), c(50, 150)), > IRanges(floor(runif(200, 1e5, 1e6)), width=100), > strand=sample(c("+", "-"), 200, TRUE), > feature_id=sprintf("ID%03d", 1:200)) > colData <- DataFrame(Treatment=rep(c("ChIP", "Input"), 3), > row.names=LETTERS[1:6]) > rse <- SummarizedExperiment( > assays=SimpleList( > counts=counts, > counts, > logcounts=counts, > counts, > counts > ), > rowRanges=rowRanges, colData=colData > ) > > > assayNames(rse) > [1] "counts" "" "logcounts" "" "" >

Kevin Rue-Albrecht (02:35:29): > It focuses on the mix of named/unnamed assays > Feel free to suggests other scenarios (discrete assays, etc.) if you can think of example use cases

Federico Marini (04:03:33): > -> graph of linked plots now available ondrafting_vignette

Kevin Rue-Albrecht (04:03:59): > can’t wait to see it

Aaron Lun (04:10:09): > That’s a pretty sadistic example, but fair enough.

Kevin Rue-Albrecht (04:10:34): > hehehe

Aaron Lun (04:10:35): > It would be a good idea to put your tests intests/testthatas you go along, to save yourself having to rewrite it all later.

Kevin Rue-Albrecht (04:11:38): > True, i’ve been thinking about that too. > To be fair, this example is entirely taken from?SummarizedExperiment+ some sadistic extra copy-pasting

Kevin Rue-Albrecht (04:11:49): > wouldn’t take long to regenerate ^^

Aaron Lun (04:12:10): > Okay, I’m going to finish the brushing memory - will not be responsive for a while.

Aaron Lun (04:36:41): > Okay, I’m back - how do I draw a rectangle with given coordinates in ggplot?

Charlotte Soneson (04:37:47): > I think it should work withgeom_rect(aes(xmin = , xmax = , ymin = , ymax = ))

Kevin Rue-Albrecht (04:38:36): > actually one correction: put all the min/max specificationsoutsidethe aes

Kevin Rue-Albrecht (04:39:06): > the aes is only useful if you supply a data.frame where each row should draw a rectangle

Charlotte Soneson (04:39:07): > ah yes, if you want to give the actual numbers

Kevin Rue-Albrecht (04:39:29): > it just depends what you want to do

Aaron Lun (04:43:34): > Okay; I presume this is possible withgeom_rect(aes(..), data)?

Kevin Rue-Albrecht (04:43:50): > exactly

Kevin Rue-Albrecht (04:44:06): > the values in youraescall then refer to columns indata

Aaron Lun (04:44:08): > okay, cool.

Aaron Lun (05:03:22): > Ugh. > > sprintf("geom_rect(aes(xmin = 'xmin', xmax = 'xmax', ymin = 'ymin', ymax = 'ymax'), data=data.frame(xmin = %.5g, xmax=%.5g, ymin = %.5g, ymax = %.5g)) +" > current$xmin, current$xmax, current$ymin, current$ymax) >

Kevin Rue-Albrecht (05:03:53): > ?

Aaron Lun (05:04:58): > Pretty damn long.

Aaron Lun (05:05:24): > Does it draw it with fill, or is it automatically empty?

Kevin Rue-Albrecht (05:06:45): > you need to add fill

Kevin Rue-Albrecht (05:07:25): > then again, iffillis a covariate, you’ll need to stash it indata, and refer toFillByin youraescall

Aaron Lun (05:07:31): > God

Aaron Lun (05:07:43): > Well, not having fill is fine for now, I’m just drawing brush limits.

Federico Marini (05:07:51): > I think fill can be some transparent shade

Federico Marini (05:07:54): > if at all

Kevin Rue-Albrecht (05:08:02): > it’s the price to pay for controlling aesthetics:wink:

Federico Marini (05:08:10): > if your aim is to just mark it on the source plot

Kevin Rue-Albrecht (05:09:18) (in thread): > Still better than the base plotting functions if you ask me. > At least with ggplot, you can break up the different aesthetics in multiple, smaller, calls, rather than one call with ten thousand arguments

Aaron Lun (05:12:42): > Hm. Above line is complaining aboutXnot found.

Kevin Rue-Albrecht (05:13:38): > arf

Kevin Rue-Albrecht (05:14:12): > it shouldn’t be a required aesthetic forgeom_rect, but let me refresh my memories

Aaron Lun (05:15:00): > I just want to draw a damn rectangle

Kevin Rue-Albrecht (05:15:20): > omg.. unrelated but we may be able to draw heat maps efficiently withggplot: “geom_raster is a high performance special case for when all the tiles are the same size.”

Kevin Rue-Albrecht (05:15:44): > it wasn’t there last time i checked, or I’ve never properly read the man page

Aaron Lun (05:16:14): > Maybe I need to get rid of the quotes.

Kevin Rue-Albrecht (05:16:19): > I’m sure you’ve read the man page, but here goes: > “geom_rect and geom_tile do the same thing, but are parameterised differently: geom_rect uses the locations of the four corners (xmin, xmax, ymin and ymax), while geom_tile uses the center of the tile and its size (x, y, width, height)”

Kevin Rue-Albrecht (05:16:36): > ahhhh yes

Kevin Rue-Albrecht (05:16:40): > i didn’t spot those

Aaron Lun (05:17:00): > Nope, that didn’t help.

Kevin Rue-Albrecht (05:17:13): > are you serious?! dammit

Kevin Rue-Albrecht (05:17:51): > Still from the man page > > # If you want to draw arbitrary rectangles, use geom_tile() or geom_rect() > df <- data.frame( > x = rep(c(2, 5, 7, 9, 12), 2), > y = rep(c(1, 2), each = 5), > z = factor(rep(1:5, each = 2)), > w = rep(diff(c(0, 4, 6, 8, 10, 14)), 2) > ) > ggplot(df, aes(xmin = x - w / 2, xmax = x + w / 2, ymin = y, ymax = y + 1)) + > geom_rect(aes(fill = z, width = w), colour = "grey50") >

Aaron Lun (05:18:37): > Okay, let’s have a look at what is causing the issue. > > plot.data <- data.frame(Y = colData(se)[,"NALIGNED"], row.names=colnames(se)); > plot.data$X <- factor(integer(ncol(se))) > plot.data$X <- as.factor(plot.data$X); > > # Defining the plot boundaries > ybounds <- range(plot.data$Y, na.rm = TRUE); > > # Setting up the data points > plot.data <- subset(plot.data, ![is.na](http://is.na)(X) & ![is.na](http://is.na)(Y)); > set.seed(100); > plot.data$jitteredX <- vipor::offsetX(plot.data$Y, > x=plot.data$X, width=0.4, varwidth=FALSE, adjust=1, > method='quasirandom', nbins=NULL) + as.integer(plot.data$X); > plot.data$GroupBy <- plot.data$X; > > # Generating the plot > ggplot(plot.data, aes(x = X, y = Y, group = GroupBy)) + > geom_violin(alpha = 0.2, scale = 'width') + > geom_point(aes(y = Y, x = jitteredX), alpha = 0.6, size = 1) + > labs(x = "", y = "NALIGNED") + > coord_cartesian(xlim = NULL, ylim = ybounds, expand = TRUE) + > # geom_rect(aes(xmin = xmin, xmax = xmax, ymin = ymin, ymax = ymax), data=data.frame(xmin = 0.94554, xmax=1.1043, ymin = 1.4775e+07, ymax = 3.7462e+07)) + > scale_x_discrete(drop = FALSE) + > theme_bw() + > theme(legend.position = 'bottom') > > # Saving for brush transmission > all.coordinates[['colDataPlot1']] <- plot.data >

Aaron Lun (05:19:17): > Doesn’t like it when that line is uncommented.

Aaron Lun (05:19:34): > Does it need to be earlier? Does the order matter?

Kevin Rue-Albrecht (05:19:59): > order doesn’t matter, only if you’re concerned about showing a layer on top of another

Kevin Rue-Albrecht (05:20:15): > ahh wait

Charlotte Soneson (05:20:26): > my guess: it is looking for the X that you specify in the ggplot call

Kevin Rue-Albrecht (05:20:28): > try puttinginherit=FALSE

Kevin Rue-Albrecht (05:20:32): > exactly

Kevin Rue-Albrecht (05:20:52): > ```

Kevin Rue-Albrecht (05:20:55): > geom_rect(mapping = NULL, data = NULL, stat = “identity”, > position = “identity”, …, na.rm = FALSE, show.legend = NA, > inherit.aes = TRUE) > ```

Kevin Rue-Albrecht (05:20:59): > inherit.aes

Aaron Lun (05:21:04): > Yep, that’s better.

Aaron Lun (05:21:11): > Though it still autofills, I wonder how to turn that off.

Kevin Rue-Albrecht (05:21:48): > fill = NULLmaybe, outside the aes

Kevin Rue-Albrecht (05:21:55): > i can’t remember the value to turn it off

Charlotte Soneson (05:22:01): > maybe cheating, butalpha = 0, color = "black"

Charlotte Soneson (05:22:36): > outside theaes

Aaron Lun (05:26:28): > God, it’s beautiful.

Kevin Rue-Albrecht (05:27:35): > talk to yourself much?:stuck_out_tongue_winking_eye:

Kevin Rue-Albrecht (05:31:16): > when’s the big push for us to see? (kid before Xmas)

Kevin Rue-Albrecht (06:15:46): > damn it’s beautiful indeed

Federico Marini (06:20:49): > Envy-boost

Federico Marini (06:20:59): > soon comes the pimped-up graph too:slightly_smiling_face:

Federico Marini (06:24:32): > @Federico Mariniuploaded a file:graph-y - File (PNG): graph-y

Federico Marini (06:24:59): > colors taken from the plot types itself

Aaron Lun (06:25:54): > The latest commit defines explicit colors as well - make sure these go somewhere centralized. It’s a shame thatboxdoesn’t allow us to specify arbitrary colors, so we just have to play along with their color scheme.

Federico Marini (06:30:55): > where would be the best place?constants.RI’d say

Aaron Lun (06:31:19): > Yes, probably.

Kevin Rue-Albrecht (06:31:27): > yes, if they’re shared across scripts

Aaron Lun (06:31:30): > Anyway, brushing memory is done. Try to break it.

Kevin Rue-Albrecht (06:31:41): > otherwise, inside the script that uses them is probably best

Aaron Lun (06:32:29): > Dealing with restriction across great grandchildren was particularly problematic, so be sure to test out complex networks.

Kevin Rue-Albrecht (06:33:20): > i still have plans to set up ‘modes’ such as FACS, that would test this kind of situation

Charlotte Soneson (07:35:13): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-01-26 at 13.30.34.pngand commented: Trying to break the brushing memory, I ran into the following: > - Set Column data plot 1 to Receive brush from Reduced dimension plot 1 - effect Restrict > - Brush in Reduced dimension plot 1 > - Brush in Column data plot 1 (although nothing is receiving) > - Change in Column data plot1 to Receive brush from Column data plot 1 - effect Color > This gives the attached plot - File (PNG): Screen Shot 2018-01-26 at 13.30.34.png

Charlotte Soneson (07:35:17): > Shouldn’t this be the same as: > - Set Column data plot 1 to Receive brush from Column data plot 1 - effect Color > - Brush in Column data plot 1 > If not, perhaps we need to indicate the whole sequence of brushes for Column data plot 1 (that it remembers what was done before, even if you change the Receive brush from)

Aaron Lun (07:40:36): > Should just be a case of retriggering the plot when updating the selection - let me see.

Aaron Lun (08:19:07): > Okay, not seeing this on my version, but I changed half a dozen things.

Charlotte Soneson (08:27:15): > Weird, it still happens for me. Things work fine if you move the Column data plot 1 brush slightly after setting Column data plot 1 to receive its own brush, it just doesn’t seem to detect the brush if it is already there. And it is only for going from Restrict -> Color, if I go via Transparent it works…:thinking_face:

Charlotte Soneson (08:30:46): > Actually, the problem rather seems to be when you change “Receive the brush from” of Column data plot 1, from Reduced dimension plot 1 to Column data plot 1, if the Brush effect is Restrict, it seems to intersect the two brushes, while for the other two effects, it changes to the one from Column data plot 1

Aaron Lun (08:44:27): > Intriuging.

Aaron Lun (08:45:03): > Refactoring another thing right now, but can you just spell out how to reproduce it? I’ll get onto it.

Charlotte Soneson (08:49:27): > 1. Coldata1: Receive brush from Reddim1, effect = Restrict > 2. Brush some points in Reddim1 > 3. Brush some points in Coldata1 > 4. Change for Coldata1: Receive brush from Coldata1 > This selects only the intersection of the brushes in 2 and 3. > If another effect is used, step 4 selects the Coldata1 brush only.

Aaron Lun (08:55:14): > Okay. There’s a lot more holes in the brushing memory than I thought, so this will take a while.

Aaron Lun (10:10:31): > Hm. I think I understand the origin of the bug - it’s because the points stored inall.coordinatesare restricted. The plot needs to be regenerated to update the stored points, which it does, but not before (incorrectly) plotting the previously restricted set.

Aaron Lun (10:11:34): > I think we need to reorder our plotting commands to delay brushing until just before plot generation. This would solve this problem and also help a lot otherwise - check out the painful loops in the reported code to handle self-brushing.

Kevin Rue-Albrecht (10:17:36): > argh - i think we owe you quite a few pints when all of this is over!

Aaron Lun (10:24:25): > Don’t touchplotting.Rfor a while, this is going to be crazy again.

Kevin Rue-Albrecht (10:24:50): > ah - good that i delayed the colormap to this weekend then?

Aaron Lun (10:25:04): > Probably.

Kevin Rue-Albrecht (10:26:09): > I know most of it is going to happen inAllClasses.R, but I have a feeling I’ll have to tweak a thing or two inplotting.R

Davis McCarthy (12:42:08): > Hey gang - I’m ju

Davis McCarthy (12:42:34): > I’ve just submitted a PR adding a dockerfile and install.R script to be able to build a working docker image for the package

Davis McCarthy (12:43:21): > I’ve added it to my builds onquay.io, so you can play around with it if you’d like:quay.io/davismcc/isee:dockerfile

Davis McCarthy (12:44:03): > if you have docker installed: > > docker pull[quay.io/davismcc/isee:dockerfile](http://quay.io/davismcc/isee:dockerfile)docker run -it[quay.io/davismcc/isee:dockerfile](http://quay.io/davismcc/isee:dockerfile)/bin/bash >

Davis McCarthy (12:50:05): > Is there a way to specify a port for the shiny app?

Kevin Rue-Albrecht (13:19:11): > not this one, yet, but it is possible withrunApp(..., port=...)

Kevin Rue-Albrecht (13:23:05): > I can switch that

Kevin Rue-Albrecht (13:36:52): > pushing in 3…2…1

Kevin Rue-Albrecht (13:47:44) (in thread): > I’ve enabled that now: > > > iSEE(sce, port = 9999) > > Listening on[http://127.0.0.1:9999](http://127.0.0.1:9999) >

Kevin Rue-Albrecht (13:49:44) (in thread): > nowiSEEsupports all the arguments thatshiny::runAppdoes. I don’t see another use for the ellipsis iniSEEanyway

Aaron Lun (14:25:48): > Just got back from a mad party

Aaron Lun (14:26:32): > This docker stuff won’t interfere with the rest of the package, right?

Federico Marini (14:42:07): > don’t know exactly

Federico Marini (14:42:20): > are there alternative locations to place it?

Federico Marini (14:45:48): > <!channel>charlotte and I are done with the bulk of the vignette. some parts need to be slightly edited, after the ui edits. and the use case where we showcsase iSEE with CyTOF data will follow too. > What is missing as of now: > - finalize the bibliography > - the screenshots (placeholders are there []) > - (slightly related: do you know how to open up the vignette from a shiny app?)

Federico Marini (14:46:06): > If you have nothing against it, I’d merge intomaster

Aaron Lun (14:46:23): > Do we need screenshots? I mean, it would be a pain to have to update things.

Federico Marini (14:46:27): > there is also the work on plotting the linked-plots graph

Federico Marini (14:46:36): > I know

Aaron Lun (14:46:43): > People should be able to just run the code and see what it looks like for themselves, right?

Federico Marini (14:46:50): > We could try to keep it general

Aaron Lun (14:48:28): > Yeah

Federico Marini (14:48:36): > You know what, let me merge it (unless big changes are expected?) and you can judge better whether you see the strict need of it

Aaron Lun (14:49:39): > Okay. Currently no screenshots, right?

Federico Marini (14:49:43): > nope

Federico Marini (14:49:53): > only [] placeholders []

Aaron Lun (14:53:21): > cool.

Federico Marini (14:59:50): > merged now intomaster

Kevin Rue-Albrecht (15:12:46) (in thread): > to place what?

Kevin Rue-Albrecht (15:12:51) (in thread): > @Federico Marini

Federico Marini (15:14:43) (in thread): > to place the`Dockerfile``

Kevin Rue-Albrecht (15:16:42) (in thread): > @Federico Marini, wanna see ifvignette("iSEE_vignette")can be launched from a button in-app?

Kevin Rue-Albrecht (15:17:21) (in thread): > there’s a chance that it won’t trigger until the app’s closed and the prompt is available again

Federico Marini (15:17:52) (in thread): > I think I tried that already. Nothing happened

Federico Marini (15:18:19) (in thread): > hence the “weirder” choice of calling it

Federico Marini (15:18:24) (in thread): > I’ll search a little more

Kevin Rue-Albrecht (15:19:38) (in thread): > ah:confused:

Aaron Lun (15:58:16): > se <- as(se, "SummarizedExperiment")????

Aaron Lun (16:00:59): > I think@Charlotte Soneson’s bug is fixed in the latest commit tohardened. Boy, was this epic.

Aaron Lun (16:02:06): > Wait, haven’t actually committed it yet.

Federico Marini (16:02:28): > git commitor it didn’t happen

Aaron Lun (16:03:01): > Done.

Kevin Rue-Albrecht (16:12:58): > heya

Kevin Rue-Albrecht (16:13:20): > aaargh

Kevin Rue-Albrecht (16:13:27): > i just realised how stupid

Kevin Rue-Albrecht (16:13:32): > omg

Aaron Lun (16:14:34): > ggplot team, note that the boundaries of the violin plots do not render properly when no points are available. This can be easily seen from the latest version, by (1) gettingcolDataPlot1to receive fromredDimPlot1, (2) setting upcolDataPlot1to restrict, and (3) brushing somewhere without points inredDimPlot1. Axis information completely vanishes fromcolDataPlot1- however, it is very important that it doesn’t do that.

Kevin Rue-Albrecht (16:15:13): > i meanas(se, 'SummarizedExperiment')does make sense to bring inExpressionSetas well

Aaron Lun (16:15:33): > This is fixed in the incoming PR.

Aaron Lun (16:18:02): > There is still one sort-of outstanding issue with the brush memory; selecting a new gene from a linked table will cause double rendering of the plot, because two updates are triggered. Not quite sure how to stop this.

Kevin Rue-Albrecht (16:18:58): > do you have at least an idea of what the two causes of the updates are?reqcan sometimes help

Aaron Lun (16:19:22): > Yes, I do.

Aaron Lun (16:19:30): > I know exactly why.

Aaron Lun (16:19:43): > But I can’t stop it without changing a whole bunch of other things.

Aaron Lun (16:20:00): > Because I have to intercept the messages passed around theShinynetworks

Kevin Rue-Albrecht (16:20:10): > Basically, it’s avalidatewithout an error message. Used with caution, you can block an update until something is valid

Aaron Lun (16:21:27): > Hm…

Kevin Rue-Albrecht (16:21:48): > typically, i use it for the startup of an app, because the inputs being initialised with a slight time offset can cause a plot to be rendered multiple times as all its inputs are being initialised

Kevin Rue-Albrecht (16:21:56): > dunno if that can help in this case

Aaron Lun (16:22:22): > I will think about it.

Aaron Lun (16:22:38): > Meanwhile, see if you can fix the violin plot axis problem.

Aaron Lun (16:22:43): > Probably affects the boxplots as well.

Aaron Lun (16:26:03): > Going home now.

Aaron Lun (16:50:50): > I think the only solution is to build a parallel network for the table->plot linkages. Which we can do. I guess that’ll be my job tomorrow.

Aaron Lun (16:51:05): > Anticipated changes toplotting.Rshould be minimal, so go ahead with the colormap.

Kevin Rue-Albrecht (16:51:19): > ok

Aaron Lun (16:51:38): > Do people enjoy the color-coding on the brush as well?

Aaron Lun (16:52:18): > Stroke of inspiration, that.

Kevin Rue-Albrecht (16:52:45): > color-coded brush was such a cool surprise: it really adds a thoughtful touch

Kevin Rue-Albrecht (16:55:24): > vignette team: i think there’s no shame hiding some of the warnings (e.g. Quick start section, awarning=FALSEwouldn’t hurt), just for the sake of not distracting the reader

Kevin Rue-Albrecht (16:57:10): > also, about the introJS tour, considering that you explain how to use it, I noticed a cool thing: if one wants to jump to any step without having to go through all the earlier ones, one can click on the circles that represent the individual steps.

Kevin Rue-Albrecht (16:59:29): > Good job writing it: i’ll continue reading later, though. I’ll try to get at least a base of colormap done tonight

Aaron Lun (17:04:40) (in thread): > HERE.

Aaron Lun (17:41:52): > Gene expression plots are currently a bit funky with respect to unnecessary re-renderings when an axis parameter is changed. This will be fixed tomorrow.

Kevin Rue-Albrecht (17:56:35): > ok. immediate question just opening the app: redDim plot doesn’t display on startup: any default changed?

Kevin Rue-Albrecht (17:57:45): > maybe it’s just a glitch on my side, re-installing now

Kevin Rue-Albrecht (17:58:18): > yep. nevermind

Aaron Lun (18:00:53): > Yes, it was caused by theas(..., "SummarizedExperiment")that I mentioned earlier.

Aaron Lun (18:01:13): > That wipes out the reduced dim slot and replaces it with an empty one.

Kevin Rue-Albrecht (18:07:37): > Makes sense. My bad. Friday night brain short-circuit:sweat_smile:

2018-01-27

Charlotte Soneson (03:34:45): > The latest commit indeed fixes the problem I had:+1:Now, for the violins, perhaps the “safest” way that I can think of to keep the axes is to create an additional data frame, containing all the points, and add ageom_blank(data = full.data)to theggplotcall. This will keep also the x-axis even if there are no points. However, it might look weird to people when it is not necessary (which I suppose will be always when people export the code, I doubt anyone will export the code for an empty plot…) Other options might be to addexpand_limits(y = ybounds), which keeps the y-axis (forces inclusion of the largest and smallest values), but does not show the0on the x-axis.

Kevin Rue-Albrecht (04:48:45): > last extreme: we could always add avalidate(need(...))no?

Kevin Rue-Albrecht (04:52:56): > although i’m not sure whether that would preserved the desired effect on the tracker script and the downstream linked plots

Aaron Lun (06:46:29): > I like thegeom_blankidea.

Kevin Rue-Albrecht (06:46:41): > sounds cleaner too

Aaron Lun (07:11:31): > Though by the time it gets togeom_blank, the full data set does not exist anymore.

Aaron Lun (07:12:16): > It would not be so painful to get it to exist… but it would still be a little painful.

Kevin Rue-Albrecht (07:13:35): > in comparison to the pain you went through for brushing ^^

Aaron Lun (07:44:12): > If we havegeom_blank, does that mean we don’t needscale_x_discreteetc. anymore?

Kevin Rue-Albrecht (07:47:04): > you don’t need to worry about scales i thinkgeom_blankclears everything

Kevin Rue-Albrecht (07:48:06): > oh no, sorry, I was thinkingtheme_void

Kevin Rue-Albrecht (07:59:55): > I’ve finally just got around to test the situation. I’m fairly sure the X-tick disappearing cannot be fixed by ggplot anymore. It’s because the data.frame is empty and therefore X does not have levels anymore. I imagine the fix would be to addplot.data$X < factor(character(), "0")to force a factor of length 0 that has a level defined - Attachment: Attachment > ggplot team, note that the boundaries of the violin plots do not render properly when no points are available. This can be easily seen from the latest version, by (1) getting colDataPlot1 to receive from redDimPlot1, (2) setting up colDataPlot1 to restrict, and (3) brushing somewhere without points in redDimPlot1. Axis information completely vanishes from colDataPlot1 - however, it is very important that it doesn’t do that.

Aaron Lun (08:00:19): > ? An empty data frame should stil have levels, surely?

Kevin Rue-Albrecht (08:01:02): > i’d expect it to, but maybe some of theplot.dataprocessing appliesdroplevels()implicitly (?)

Aaron Lun (08:01:15): > Only subset would do this.

Aaron Lun (08:01:27): > but it already hasdrop=FALSEby default.

Kevin Rue-Albrecht (08:02:45): > i’ll have to run the output script to see what goes on, and maybe throw in a couple of debug print statements to have runtime information

Aaron Lun (08:03:23): > Yep.

Aaron Lun (08:03:43): > Just give me a MWE for how to get it to work, and we can figure it out from there.

Kevin Rue-Albrecht (08:04:00): > Ok.

Kevin Rue-Albrecht (08:06:39): > Hm.. as we expected the length-0 factor has a level. So itisggplot dark magic at work > > > plot.data$X > factor(0) > Levels: 0 >

Kevin Rue-Albrecht (08:06:58): > (the resulting violin having no X axis tick in this case)

Kevin Rue-Albrecht (08:22:40): > I may be homing in on a fix: > > discrete_scale(..., na.translate = TRUE, na.value = NA, drop = TRUE ...) >

Kevin Rue-Albrecht (08:23:56): > basically, violin don’t like empty tables:discrete_scale(drop=FALSE)only seems to work is one data pointispresent

Kevin Rue-Albrecht (08:24:34): > I can sort of rescue that aspect byif(nrow(plot.table)==0){rbind(NA)}(invalid code to give you the jist)

Kevin Rue-Albrecht (08:25:16): > but then, I get an extra tick forNAlevel because of ourdrop=FALSEwish

Kevin Rue-Albrecht (08:25:57): > now, we can’t translateNAto the0level.. otherwise we’d be creating a level….. or not, because YisNA!

Kevin Rue-Albrecht (08:26:01): > let me try that

Aaron Lun (08:27:17): > Good grief. ggplot makes hard things simple and simple things hard, so it seems.

Kevin Rue-Albrecht (08:28:24): > always the same story in softare dev: 90% of feature in 10% of the time and vice versa

Kevin Rue-Albrecht (08:28:42): > damn corner cases

Kevin Rue-Albrecht (08:32:13): > damn, can’t get rid of the damnNAnow. Feel free to play with > > plot.data <- data.frame( > Y = numeric(), > X = factor(levels = "0"), > BrushBy = logical(), > GroupBy = factor(levels = "0"), > jitteredX = numeric() > ) > if (identical(nrow(plot.data), 0L)){ > dummy <- matrix(NA, nrow = 1, ncol = ncol(plot.data), dimnames = list(character(), colnames(plot.data))) > dummy <- as.data.frame(dummy) > dummy$X <- factor(dummy$X, levels(plot.data$X)) > plot.data <- rbind(plot.data, dummy) > } > > # Creating the plot > ggplot(plot.data, aes(x = X, y = Y, group = GroupBy)) + > geom_violin(data = plot.data, alpha = 0.2, scale = 'width', na.rm = TRUE) + > geom_point(aes(y = Y, x = jitteredX), plot.data) + > labs(x = "", y = "NREADS") + > coord_cartesian(xlim = NULL, ylim = ybounds, expand = TRUE) + > scale_x_discrete(drop = FALSE, na.translate = TRUE, na.value = 0) + > theme_bw() + > theme(legend.position = 'bottom') >

Kevin Rue-Albrecht (08:32:54): > … after picking the rest of the script from the scenario that I copy pasted from Aaron’s earlier script a few messages above

Kevin Rue-Albrecht (08:33:20): > ah no wait, I can edit to give a MWE without the hassle

Kevin Rue-Albrecht (08:35:10): > here you go

Kevin Rue-Albrecht (08:37:34): > there’s a funny ‘NA -’ that appears in the bottom left corner though, with this approach

Aaron Lun (08:37:54): > Well, I’m still dealing with the table thing I mentioned yesterday,…

Aaron Lun (08:39:37): > real knockdown dragout battle

Kevin Rue-Albrecht (08:45:42): > I think I got it. Thanks to@Charlotte Soneson(again!)

Kevin Rue-Albrecht (08:47:45): > It’s all in thegeom_blank, and a extrafull.data

Charlotte Soneson (09:01:00): > Maybe we don’t even need to create two data frames.ggplot’sgeom_*can apparently take as adataobject a function, which takes as single argument the top-level data frame, and returns a data frame that will be used for plotting. So if we provide the full data frame, with a columnBrushBy, a function that subsets by this column can be used as thedataargument for all parts of theggplotcommand that should use only the brushed points. And I guess we no longer need thecoord_cartesian(...)andscale_x_discrete()stuff.

Charlotte Soneson (09:01:07): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-01-27 at 15.00.41.png - File (PNG): Screen Shot 2018-01-27 at 15.00.41.png

Aaron Lun (09:01:37): > Note thatcoord_cartesianis still necessary for zooming, andcoord_flipis still necessary for flipping.

Charlotte Soneson (09:01:54): > Aha, ok

Aaron Lun (09:24:27): > This table thing is hellish beyond words

Kevin Rue-Albrecht (09:25:06): > have you started drawing dependency trees on your house walls? ^^

Aaron Lun (09:25:22): > I can see them when I close my eyes.

Aaron Lun (09:54:46): > Okay, I feel I’m halfway there. I have purged the reactives in the plotting code, which now only depends on memories inpObjects. This makes it a lot easier to control and test.

Aaron Lun (09:55:05): > Now I just need to make sure that the tables update properly when removing panels.

Kevin Rue-Albrecht (09:55:11): > any major impact on the colormaps?

Aaron Lun (09:55:30): > I don’t think so, but have a look at the changes inplotting.R.

Aaron Lun (09:55:44): > Long story short,inputdoes not exist inplotting.Rany more (besides in the validation messages).

Aaron Lun (10:25:39): > God, it’s over.

Kevin Rue-Albrecht (10:27:45): > Well done. I’ve only truly started getting into the colormap defaults 10 min ago. I’m applying the (1) assay name/index, (2) all_assay, (3) global, (4) hard-coded default strategy. I’ll keep you posted.

Kevin Rue-Albrecht (10:28:37): > would you expect support for an index-based colData colormap, in addition to anames(colData)one?

Kevin Rue-Albrecht (10:28:49) (in thread): > i hope you take a break:wink:

Aaron Lun (10:29:09): > No, coldata should have unique names I think.

Kevin Rue-Albrecht (10:30:00): > I think so too: i foresee hell of a mess with the large number of columns in that slot.

Kevin Rue-Albrecht (10:33:11): > Peek on theshowmethod: > > > ecm > Class: ExperimentColorMap > assays(0): > colData(0): > rowData(0): > all(1): assays > global: TRUE >

Kevin Rue-Albrecht (10:33:51): > allis a slot that may contain one colormap per slot

Aaron Lun (10:33:58): > what’s with theTRUE? As in whether it exists or not?

Aaron Lun (10:34:04): > set or not, I mean.

Kevin Rue-Albrecht (10:34:15): > yes.. i’ve been thinking for 5 min what to show for it

Kevin Rue-Albrecht (10:34:58): > hence my post for feedback before I push something that I know is not ideal

Kevin Rue-Albrecht (10:35:23): > For theallslot, theshowmethod list the slot names for which a shared fallback colormap was defined

Kevin Rue-Albrecht (10:37:14) (in thread): > Is that just weird? > > > ecm > Class: ExperimentColorMap > assays(0): > colData(0): > rowData(0): > all(1): assays > global >

Kevin Rue-Albrecht (10:37:30) (in thread): > Or maybe > > > ecm > Class: ExperimentColorMap > assays(0): > colData(0): > rowData(0): > all(1): assays > global(1) >

Kevin Rue-Albrecht (10:37:45) (in thread): > for homogeneity

Aaron Lun (10:38:21): > Note that we’ll need discrete vs continuous options for everything.

Kevin Rue-Albrecht (10:38:55): > yeah - that’s the part that keep giving me headaches

Kevin Rue-Albrecht (10:39:51): > I mean, once past the individual colormaps, can’t we ask users to supply functions that have adiscrete=TRUE|FALSEargument?

Aaron Lun (10:39:51): > Oh? Just have each list with a discrete or continuous sublist.

Aaron Lun (10:40:10): > Not really.

Aaron Lun (10:40:32): > That would prevent the direct use ofviridis::viridis, etc.

Aaron Lun (10:40:53): > You would basically force everyone to define a function wrapper around built-ins.

Kevin Rue-Albrecht (10:41:13): > yeah. i really need to thinkbeforei write here

Kevin Rue-Albrecht (10:49:51): > in the happy news, I’ve found a generator function for any number of discrete colors:https://stackoverflow.com/questions/8197559/emulate-ggplot2-default-color-palette - Attachment (stackoverflow.com): Emulate ggplot2 default color palette > What function can I use to emulate ggplot2’s default color palette for a desired number of colors. For example, an input of 3 would produce a character vector of HEX colors with these colors:

Kevin Rue-Albrecht (12:40:24): > thisExperimentColorMapwas either a moment of inspiration, or a one-way ticket to hell:sweat_smile:

Aaron Lun (12:40:51): > I’m all done on my end, waiting for CI to clear for merge.

Aaron Lun (12:42:41): > @Federico MariniTable links are now available inpObjects$table_links. These should probably be added to the network.

Kevin Rue-Albrecht (12:44:17): > I was thinking about a different approach:scale_color_manual(values=assayColorMap(map, assay_choice))(10) +written as such in the script

Kevin Rue-Albrecht (12:44:46): > (almost as such, substituteassay_choice)

Aaron Lun (12:45:05): > That is one alternative.

Kevin Rue-Albrecht (12:45:12): > implying thatassayColorMap(map, assay_choice))return a simplefunction(n)

Kevin Rue-Albrecht (12:45:19): > where n is the number of colors requested

Aaron Lun (12:45:31): > I’m fine with that, though you will need to modifycodetrackto define the map at the top.

Kevin Rue-Albrecht (12:46:10): > yep - i was tracking down all thecolor_FUNto delete as well, considering that there’s a lot less to compute before writing the script

Kevin Rue-Albrecht (12:46:49): > there are just a lot of ellipses that appeared throughoutplotting.Rrecently ….:smirk:

Kevin Rue-Albrecht (12:47:31): > (maybe not a lot, but it’s taking me time to figure out what passes where)

Aaron Lun (12:47:51): > Wait - why are you deletingcolor_FUN?

Kevin Rue-Albrecht (12:48:29): > well i did, but then i’ve reverted all the code back because i’m pretty sure it was a mistake too

Aaron Lun (12:48:44): > Your functions don’t seem to take a discreteness argument, so you needcolor_FUNto make that choice.

Kevin Rue-Albrecht (12:50:05): > yep, don’t worry, I was toying around to catch up on the latest updates, but i realised i was making a mess and i’ve reverted back to a clean slate 10 min ago

Kevin Rue-Albrecht (12:50:23): > i just kept the new structure of ECM that I;ve described earlier

Aaron Lun (13:34:37) (in thread): > I would also suggest moving the code to generate the graph intocodetrack.R, to reduce the size ofiSEE.R, which is already over 500 lines.

Aaron Lun (13:41:35): > A whole bunch of things are merged. vignette team: note some minor changes in the interface.

Kevin Rue-Albrecht (13:41:57): > Cool. Well done, seriously.

Kevin Rue-Albrecht (13:42:46): > If my battle plan is correct, I’m close to writing the correct command for the scatter plot, which should then generalise fairly easily to the others

Kevin Rue-Albrecht (13:43:25): > i’ll have to go out for a bit though before I have time to test

Kevin Rue-Albrecht (13:43:40): > your color_FUN is still there Aaron:wink:

Aaron Lun (13:44:16): > Excellent.

Aaron Lun (14:01:12): > Done for the day, bugging out.

Federico Marini (14:23:48) (in thread): > on it soon

Federico Marini (14:24:07) (in thread): > I am not so fmiliar with igraph but it should not be rocket science

Federico Marini (14:37:00): > wow, the ui gets pimped up once again:slightly_smiling_face:

Federico Marini (14:38:00): > one thing to be kept in mind: I can not access the ui elements from the modals for the introjs tour - at least, with my actual knowledges

Federico Marini (14:39:31): > and a comment on the trash icon: I’d keep it somewhat more highlighted

Federico Marini (14:40:15): > not that users mis-click it? thinking of fitts’ law

Federico Marini (14:49:39): > I can not open more than one gene stats table now

Federico Marini (14:51:04): > fails with Warning: Error in strsplit: non-character argument > No stack trace available

Federico Marini (15:22:37): > lost in list:stuck_out_tongue:

Kevin Rue-Albrecht (15:22:44): > ?

Federico Marini (15:27:56): > trying to figure out how to tidily extract the table-plot relationships, and put them in the graph

Kevin Rue-Albrecht (15:28:05): > ahh

Kevin Rue-Albrecht (15:29:05): > i’m personally lost in inception: because of this damn discrete/continuous ambivalence, i’m currently returning a function that returns one of two functions depending on its argument:dizzy_face:

Federico Marini (15:34:12): > oh

Kevin Rue-Albrecht (15:48:30): > weird.. it seems thatcolor_discretealways evaluates toFALSEeven with clearly discrete factors

Kevin Rue-Albrecht (15:48:34): > investigating

Kevin Rue-Albrecht (15:49:07): > I just put aprint(coloring)aftercoloring <- eval_env$plot.data$ColorByinplotting.R

Charlotte Soneson (15:58:31): > I just pushed thefixaxisbranch, which (I think) contains a fix for the disappearing axis when the brush is empty. Let me know if there are any weird things happening… In the end, I created another data frame with all the values, and supplied that togeom_blank. The other option would be to subset within the plot commands, as well as when adding toall_coordinates.

Kevin Rue-Albrecht (16:03:35): > Ok. I’m starting to wonder whether something got broken in.create_plotwhen checking if something is groupable

Kevin Rue-Albrecht (16:04:00): > coloring <- eval_env$plot.data$ColorByseems to constantly returnNULL

Kevin Rue-Albrecht (16:06:38): > i’ll merge in the latest updates to master, to see if that does any good

Federico Marini (16:14:28): > do you guys also have the same issue of creating extra gene tables?

Kevin Rue-Albrecht (16:14:58): > i haven’t tried yet. I’m tracking where on earth the commands that createColorByhave gone

Kevin Rue-Albrecht (16:16:58): > i think i’ve got the logic in place to supply all kinds of colormaps, but somehow every colData covariate is now detected as continuous, even though i haven’t touched that: colormap selection is downstream of that detection

Charlotte Soneson (16:17:22): > Yes, I have the same problems with additional gene tables. It is created, then the app crashes

Kevin Rue-Albrecht (16:17:58): > i’m adding print statements all over the place to track down where things go wrong

Federico Marini (16:18:50): > ok - “good” to know it is not just me

Federico Marini (16:20:14): > @Federico Mariniuploaded a file:Screen Shot 2018-01-27 at 22.19.51.png - File (PNG): Screen Shot 2018-01-27 at 22.19.51.png

Federico Marini (16:20:30): > rudimental (the code) but yet seems to be working

Federico Marini (16:20:37): > at least with 1 tbl

Federico Marini (16:21:07): > I feel I am using the most stupid way possible the igraph functions, i.e. brutal for loops

Federico Marini (16:21:16): > but they seem to do the job

Kevin Rue-Albrecht (16:24:52): > anyone knows abouteval_env$plot.data, or was it Aaron who refactored it? > i think there are some naming issues that lead toNULLduring evaluation

Federico Marini (16:25:10): > wasntme

Kevin Rue-Albrecht (16:25:35): > “but she caught me on the counter”:notes:

Kevin Rue-Albrecht (16:25:56) (in thread): > https://www.youtube.com/watch?v=ZyeOvBjVlfI - Attachment (YouTube): SHAGGY-LICIOUS - It Wasn’t Me (Shaggy Cover)

Federico Marini (16:26:22): > I am torn between saying again “wasntme” and not contributing to reaching so fast the 10k messages limit

Kevin Rue-Albrecht (16:26:31): > hehehe

Kevin Rue-Albrecht (16:26:40): > i think we boosted that upward recently

Kevin Rue-Albrecht (16:27:52): > anyway, I think I understand now, I’m pretty sure all theeval_env$plot.data$...things are evaluated asNULL

Charlotte Soneson (16:28:32): > Maybe the problem with the new table is that no other plots are using it, so it doesn’t have any children, andiSEE.Rline 747 goes crazy when trying to split NULL

Federico Marini (16:30:02): > i did not track it yet but you might be very right

Federico Marini (16:31:21): > from the .split_encoded call

Aaron Lun (16:31:52): > Wait wait wait

Aaron Lun (16:31:57): > wHat’s going on.

Kevin Rue-Albrecht (16:32:03): > I think my issue comes from a misplace command betweendata_cmdsandsetup_cmds

Kevin Rue-Albrecht (16:32:10): > now i can see stuff

Kevin Rue-Albrecht (16:32:32): > :sob:

Aaron Lun (16:34:31) (in thread): > Subsetting within the plot commands is not easy, because the calculations for the quasi random scatter are done on the subset. It’s not impsosible, but we’d have to subset it; do the calculations; and then restore the full dimensions back again.

Aaron Lun (16:34:55) (in thread): > This might be something with.split_encoded.

Federico Marini (16:35:17) (in thread): > yep

Federico Marini (16:35:27) (in thread): > charlotte helped spotting it out

Charlotte Soneson (16:35:44) (in thread): > Do the scatter calculations need to be done on the subset, or could they be done before and then everything subsetted?

Federico Marini (16:35:52) (in thread): > I have the grpah ready also with the table

Federico Marini (16:35:58) (in thread): > tables, I could not test yet

Federico Marini (16:36:06) (in thread): > but I think it might be robust

Charlotte Soneson (16:36:16) (in thread): > That would also place the subsetted scattered points in the same place as they are in the full data

Aaron Lun (16:37:02) (in thread): > My guess is that.split_encodeddoes not like being fedNULL.

Federico Marini (16:38:05) (in thread): > which would be the case whrn the new table gets created and noone cares about her

Kevin Rue-Albrecht (16:38:36): > setup_cmds[["color"]] <- color_out$cmdshould bedata_cmds[["color"]] <- color_out$cmd

Kevin Rue-Albrecht (16:38:58): > otherwise,ColorBydoes not exist in time to be checked for ‘groupability’ in.create_plot

Aaron Lun (16:39:31): > Be careful about shuffling things around.

Kevin Rue-Albrecht (16:40:18): > well, I’ve been _not_shuffling around things for the last few hours, and was wondering whycoloringwas constantlyNULL

Aaron Lun (16:40:31): > Where are you putting your colorby command?

Aaron Lun (16:40:51): > It should be going intoplot_cmds, right?

Kevin Rue-Albrecht (16:41:07): > i think we’re not talking about the same commands

Kevin Rue-Albrecht (16:41:41): > i’m talking about the command that creates theColorBycolumn, not the one(s) that uses it to color layers

Kevin Rue-Albrecht (16:42:17): > In.create_plotyou have a line that sayscoloring <- eval_env$plot.data$ColorBy

Aaron Lun (16:42:24): > Yes

Aaron Lun (16:42:25): > Right

Aaron Lun (16:42:36): > Hm. This is troublesome.

Aaron Lun (16:42:53): > It needs to go intosetup_cmds, otherwise the distinctions between the groups of commands fall apart.

Kevin Rue-Albrecht (16:42:55): > however, I’ve printedeval_env$plot.data, and that shows no command about setting upColorByeven when colors are selected

Kevin Rue-Albrecht (16:43:19): > thereby,eval_env$plot.data$ColorBysystematically returnsNULL

Aaron Lun (16:43:38): > Yes, I understand the problem.

Kevin Rue-Albrecht (16:44:01): > … which leads tocolor_discretesystematicallyFALSE, and the script always expecting a continuous color map even when I send a discrete one

Kevin Rue-Albrecht (16:45:09): > what’s the reason for storing theColorBycommand insetup_cmdsrather thandata_cmds?

Aaron Lun (16:45:26): > Because it’s part of the plot setup rather than the plot data.

Aaron Lun (16:45:41): > But I guess wecouldput it into data.

Kevin Rue-Albrecht (16:45:55): > hm.. i’d have to navigate the code again to understand why that is

Aaron Lun (16:45:59): > It sort of is data. But not really.

Aaron Lun (16:46:29): > Hm.

Aaron Lun (16:46:38): > Well, maybe it’s the lesser of two evils.

Kevin Rue-Albrecht (16:46:43): > well, i’m not sure what you consider data then. My immediate intuition is that any column inplot.datais data

Aaron Lun (16:46:44): > We’ll just pretend that it’s data.

Aaron Lun (16:47:01): > Well, the idea was to distinguish from X, Y and (possibly ColorBy)

Aaron Lun (16:47:10): > from jitteredX, jitteredY and other weird crap

Aaron Lun (16:47:19): > that gets plonked in to make the plot.

Kevin Rue-Albrecht (16:47:20): > i see what you mean

Aaron Lun (16:47:34): > And also to distinguish from brushBy, which causes headaches of its own due to circularity.

Aaron Lun (16:48:46): > Okay. I would suggest changing all color fromsetup_cmdstodata_cmds.

Kevin Rue-Albrecht (16:48:46): > I get where you’re coming from. However, thecoloring <- eval_env$plot.data$ColorByreally needsColorByto be already in place. Therefore, it’ll have to be data in the curren setup

Aaron Lun (16:48:58): > This is the lesser of the two evils.

Aaron Lun (16:49:10): > Given that brushBy is already stored.

Aaron Lun (16:49:22): > So X, Y, colorBy and brushBy represents the “data”

Aaron Lun (16:49:37): > and the jittered X/Y columns are everything else in the set up.

Kevin Rue-Albrecht (16:49:51): > Exactly. I don’t mind if you do another refactoring from hell later, but after spending hours on end today tracking that ghost down, I’m not ashamed from taking the shortest path here

Aaron Lun (16:50:05): > This also means that we no longer need explicitsetup_cmdsargument in.create_plot().

Aaron Lun (16:50:35): > Well, the reorganization was important to avoid needing to create loops in the code tracker.

Kevin Rue-Albrecht (16:50:39): > yep, I spotted that you seem to have createdsetup_cmdsspecifically forColorBy

Kevin Rue-Albrecht (16:56:31): > when i retire, screw puzzles, i’m gonna assemble the dependency tree of this app

Aaron Lun (16:58:34): > Well, it’s a lot simpler now, because everything is fully contained withiniSEE.R. Notinputinplotting.Ras there were before.

Aaron Lun (16:58:59) (in thread): > Yes, the scatter calculations do need to be done on the subset.

Aaron Lun (16:59:31) (in thread): > Otherwise we get densities in the scatter that don’t really make sense.

Kevin Rue-Albrecht (16:59:56): > I do appreciate how you’ve organised the infrastructure.

Aaron Lun (16:59:56) (in thread): > It is also important to subset it so that brushing by restriction makes sense on its dependent plots.

Kevin Rue-Albrecht (17:01:49): > Alright. Nearly there. I just need to deal with the discrete colormaps, differentiating the ‘static’ ones that give the same vector of (named) colors, from the ‘dynamic’ ones that deliver N (unnamed) colors upon request.

Aaron Lun (17:02:02) (in thread): > If you like, you can put anifclause in.create_plotafter the second evaluation ofeval_env$plot.data, asking whether there are non-zero rows. If so, you can remove the commands insetup_cmdsandplot_cmdsthat you added, to avoid cluttering the code tracker with unused code.

Charlotte Soneson (17:02:34) (in thread): > Yeah, I’ll do that

Aaron Lun (17:02:35): > Just have a function that doesn’t care about its arguments.

Kevin Rue-Albrecht (17:02:37): > The difference between the user controlling which color is assigned to which level, and a colormap supplying N colors arbitrarily assigned to the N levels of a factor.

Aaron Lun (17:02:57) (in thread): > Add some pretty clear comments, though.

Charlotte Soneson (17:03:03) (in thread): > Yep

Kevin Rue-Albrecht (17:03:11): > I have this function(s) already, actually.

Aaron Lun (17:04:11): > Well, the user-controlled levels are only going to be useful in the top-levelassays, right.

Kevin Rue-Albrecht (17:04:16): > It’s just supplying the N, that’s slowing me down. Needs a bit of evaluation to find it

Kevin Rue-Albrecht (17:04:23): > yep

Aaron Lun (17:04:47): > Yes, you will need to extract this information at thecolor_discretestage.

Kevin Rue-Albrecht (17:05:02): > it’s when you get down to the ‘shared’ colormaps that you need to dynamically compute the number of colours that you need the colormap to return

Aaron Lun (17:05:10): > I’m okay with changing that argument to just report the number of levels.

Aaron Lun (17:05:19): > I mean, we’ll have this information in.create_plot.

Aaron Lun (17:05:49): > So just change it ton_colors, set toInfif it was not groupable, and the number of levels otherwise.

Aaron Lun (17:06:03): > I think there was an old.nlevelsfunction somewhere…

Aaron Lun (17:06:15): > Maybe it got refactored away.

Kevin Rue-Albrecht (17:06:37): > hehehe, I sense in the “…” that you know that I wrote that function myself:wink:

Kevin Rue-Albrecht (17:06:43): > no no, it’s still there

Aaron Lun (17:07:01): > And then change the function-generating function to take the number of colors rather thanis_discrete.

Kevin Rue-Albrecht (17:09:55): > thanks for the advice: at the moment I was working directly in.scatter_plot,where you were applying thecolor_FUNfunction, but indeed, I could see in my code that it was going to be redundantly coy pasted in the other plotting functions

Federico Marini (17:50:57): > merge intomastercomplete for the graphs including also tables, plus hotfix on the crash when opening up new table (thx to Aaron)

2018-01-28

Charlotte Soneson (02:40:20) (in thread): > I added the check in.create_plotand removed the commands ifeval_env$plot.datahas zero rows. It is perhaps not optimal since the creation ofplot.data.allis done in thebrush_cmds(has to be done before the subsetting), soeval_envwill have aplot.data.allin any case. Thus, if we at some point useplot.data.allto affect any other variable up until thebrushcommands, the code that we return will no longer run. What’s your opinion, should we leave it there? Or, add anifto thebrush$fullcommand, so thatplot.data.allwill only be created if no points are brushed? The only completely “clean” way I see, where it will only be evaluated if needed, is to split thebrushcommands in two: brushing and subsetting.

Kevin Rue-Albrecht (04:37:22): > Merge into master completed last night for support of custom maps.

Kevin Rue-Albrecht (04:38:06): > As ECM do not need to contain the same number of maps as there are assays, they must be named

Kevin Rue-Albrecht (04:49:06): > I mean for use within the app

Kevin Rue-Albrecht (04:49:26): > outside, users can access them by index as long as they know what they’re doing

Kevin Rue-Albrecht (04:51:58): > within the app, as the assay choice is stored as the index (not the name), my only choice is to fetch the name of the i-th assay, and look for that name in theExperimentColorMap

Kevin Rue-Albrecht (04:54:18): > the only way to access both theassayand thecolormapby index would be ifcolormapwas stored in a slot of theSCE, that would allow to keep the two coordinated (e.g. fill the ECM withNULLcolormaps where undefined, to keep the number of assays/colormaps the same)

Kevin Rue-Albrecht (05:19:38): > Btw, i haven’t fully documented the features yet. That’s as far as I got last night. and i have also on my to-do list: validity method for the ECM class, check against the SE as soon as the app launched. I’ll look into this as soon as possible, but can’t guarantee a time due to local duties

Aaron Lun (07:15:55) (in thread): > We can catch this by simply destroyingplot.data.allin.create_plotin the sameifclause. This will ensure that if we ever did add some code depending onplot.data.allwhen it doesn’t exist, it would immediately cause errors, thus allowing us to easily debug it.

Aaron Lun (07:17:00) (in thread): > This seems like the best approach. We can do this automatically withiniSEE(), so the user only needs to fill by name.

Aaron Lun (07:18:24): > Nice work. Your refactoring ofplotting.Rwas a bit odd, though - it would have been easier to redefine the function in.process_colorby_choice()to handle all the different types of color inputs.

Aaron Lun (07:18:49): > This would avoid the need to double-check the color inputs in.create_plot().

Kevin Rue-Albrecht (07:19:46): > Yeah - honestly, I wasn’t thinking very clearly anymore at the end. Just wanted to push in something that worked, and leave the clean refactoring for another day.

Aaron Lun (07:19:52): > I’ll handle it.

Kevin Rue-Albrecht (07:20:09): > thanks.

Kevin Rue-Albrecht (07:22:12) (in thread): > I don’t want to rush into things, but I keep wondering whether the core Bioc team would approve aColoredExperimentthat has an extra slot to store anExperimentColorMap

Kevin Rue-Albrecht (07:23:12) (in thread): > At least we’re offering a proof of concept iniSEE, and they can then decide what’s best

Aaron Lun (07:32:35) (in thread): > I doubt they would… we’d have to do it ourselves.

Aaron Lun (07:47:37) (in thread): > But if we do havegeom_blank, maybe that might allow us to get rid of thescale_x_discrete, etc.?

Aaron Lun (07:48:01) (in thread): > coord_cartesianand friends would still need to be there, but only for zooming.

Charlotte Soneson (07:48:07) (in thread): > I guess destroyingplot.data.allwill work as long as the new code is not in thebrush_cmds, right? But that might be good enough:slightly_smiling_face:

Charlotte Soneson (07:48:30) (in thread): > And yes, I would say that we don’t need thescalethings.

Kevin Rue-Albrecht (07:54:15): > I’ll be out for the rest of today. If anyone could merge my PR#100when it’s finished updating, that’d save me updating it again later. Cheers!

Aaron Lun (07:54:29): > Does that fix the out-of-bounds error withassayColorMap?

Aaron Lun (07:54:35): > Currently finished refactoring.

Kevin Rue-Albrecht (07:54:46): > ow.. can’t remember testing that

Aaron Lun (07:55:12): > ecmin?iSEEdoesn’t have an entry forlogcounts.

Aaron Lun (07:55:37): > Giving me:

 assayColorMap(ecm,6)
Error in x@assays[[i]] : subscript out of bounds

Kevin Rue-Albrecht (07:55:37): > otherwise, just apply the logic implemented inSummarizedExperiment-class.R: > > setMethod("assay", c("SummarizedExperiment", "numeric"), > function(x, i, ...) > { > tryCatch({ > assays(x, ...)[[i]] > }, error=function(err) { > stop("'assay(<", class(x), ">, i=\"numeric\", ...)' ", > "invalid subscript 'i'\n", conditionMessage(err)) > }) > }) >

Kevin Rue-Albrecht (07:55:56): > except that instead ofstop, returnNULL

Aaron Lun (07:56:13): > Shouldn’t it go up the hierarchy of defaults?

Kevin Rue-Albrecht (07:56:17) (in thread): > interactively, i’d expect an error

Aaron Lun (07:57:05): > Otherwise a user would have to specify every color for every assay/coldata; that’s quite a burden.

Kevin Rue-Albrecht (07:57:06) (in thread): > but then, i think the chunk of code that I’ve just sent fromSummarizedExperiment-class.Rshould help the accessor go down in the hierarchy

Kevin Rue-Albrecht (07:57:54) (in thread): > thetryCatchreturningNULLwill avoid the out of bound error

Aaron Lun (07:58:25) (in thread): > I’d expect the default color map.

Kevin Rue-Albrecht (07:58:36) (in thread): > and in my code, theif(is.null)will understand that as a signal to go down the hierarchy

Kevin Rue-Albrecht (07:58:41) (in thread): > got it?

Kevin Rue-Albrecht (07:58:57) (in thread): > i can’t implemented it now as we’re dressing up to leave now

Aaron Lun (07:59:07) (in thread): > I’ll have a look at it.

Kevin Rue-Albrecht (07:59:10) (in thread): > cool

Kevin Rue-Albrecht (07:59:15) (in thread): > catch up later

Kevin Rue-Albrecht (08:55:27) (in thread): > Btw: I hope you’ve noticed that an ellipsis passes arguments down to the individual colormap functions, including ‘discrete’. Which mutes the need for a parallel hierarchy of discrete and continuous colormaps.

Kevin Rue-Albrecht (08:57:10) (in thread): > I got the inspiration of how your refactoring of ‘plotting.R’ passes arguments picked up as needed

Aaron Lun (09:11:34) (in thread): > Shouldn’t you have a discrete/continuous choice in.colDataAllColorMapand.assayAllColorMap?

Federico Marini (09:12:20): > bummer, I can not anchor introjs tour steps to dropdown menus and their contents

Federico Marini (09:12:38): > there is no possibility to pass theidparameter

Aaron Lun (09:14:29): > Don’t worry about it; those things aren’t necessary for the interface itself anyway.

Aaron Lun (09:14:45): > They’re more like add-ons, really.

Aaron Lun (09:15:09): > And we need to keep the LHS panel light, otherwise there will be much scrolling.

Federico Marini (09:15:24): > k

Federico Marini (09:15:44): > maybe it is somehow possible to override the dropdown menu function

Federico Marini (09:15:48): > if we define our own

Aaron Lun (09:16:07): > Well, we’d have to define our own that is able to interact with shiny’sinput.

Federico Marini (09:16:32): > which just mimics the functionality as in shinydashboard, and then “just add that part”

Federico Marini (09:16:54): > ok, low priority:slightly_smiling_face:

Aaron Lun (09:17:16): > The problem is that this would need to be done at the JS level.

Aaron Lun (09:17:27): > which was a real pain for the collapsible boxes.

Federico Marini (09:17:32): > likely:disappointed:

Aaron Lun (09:17:36): > I still don’t really know how I got that to work.

Federico Marini (09:17:46): > serendipity?:smile:

Aaron Lun (09:23:37) (in thread): > Frustratingly… we still do need thescalethings, otherwise empty levels are just dropped in the violin plots. Moreover, we stillcoord_cartesian, because otherwise the plot will expand to put more space between the edge of the plot and the brushing box we draw withgeom_rect. FFS,ggplotis too smart for its own good.

Charlotte Soneson (09:26:19) (in thread): > Mhm… But it should only drop levels that are empty in the entire original data set, no?

Charlotte Soneson (09:26:31) (in thread): > Or that only correspond to NA values of the things we plot.

Aaron Lun (09:26:41) (in thread): > Apparently not.

Charlotte Soneson (09:26:45) (in thread): > Interesting

Aaron Lun (09:35:02) (in thread): > Also, we need to think of a better x-axis label than “0” when there are no groupings on the violin plots.

Aaron Lun (09:35:23) (in thread): > What about “all”?

Kevin Rue-Albrecht (09:37:50) (in thread): > Haven’t tested it yet, but maybe it’ll just need to be explicitly coded as in: > ’.globalColorMap <- function(x, …, discrete = FALSE){‘

Kevin Rue-Albrecht (09:38:06) (in thread): > (No backtick on the phone)

Charlotte Soneson (09:48:43) (in thread): > Or nothing?

Aaron Lun (09:52:10) (in thread): > Think “All cells” might be better.

Charlotte Soneson (09:53:58) (in thread): > I’m thinking two things: 1. what if the data is not single cell (so the columns are something else), 2. if the data are brushed, it is not actually all cells…

Aaron Lun (09:55:09) (in thread): > Hm.

Aaron Lun (09:55:20) (in thread): > Can we just turn off the label - give it an empty string?

Charlotte Soneson (09:55:53) (in thread): > The axis label is already an empty string, but if we can somehow getaxis.text.x = element_blank()into the theme, that will turn of the tick mark label

Aaron Lun (09:56:22) (in thread): > Was it an empty string? I think I was seeing zeroes.

Aaron Lun (09:56:32) (in thread): > The tick mark is not so bad.

Charlotte Soneson (09:56:45) (in thread): > The tick mark will be kept, just the label of the tick will be gone

Charlotte Soneson (09:57:09) (in thread): > The 0 is because all the values in theXcolumns are 0

Aaron Lun (09:57:26) (in thread): > Okay, we can change theXto an empty string.

Charlotte Soneson (09:59:11) (in thread): > Yes, settingplot.data$X <- ""seems to work as well.

Aaron Lun (10:01:27) (in thread): > Could you do that torefactor?

Charlotte Soneson (10:02:46) (in thread): > Yes

Charlotte Soneson (10:06:36) (in thread): > Pushed

Charlotte Soneson (10:07:10) (in thread): > Just changedinteger(ncol(se))tocharacter(ncol(se))

Aaron Lun (10:07:45) (in thread): > Thx

Aaron Lun (11:06:08) (in thread): > Looking at your class definition, you could just change it to: > > setClass("ExperimentColorMap", > contains="Vector", > representation( > # each slot has a list of closures > assays="list", > colData="list", > rowData="list", > all_discrete="list", > all_continuous="list", > global_discrete="function_or_NULL" > global_continuous="function_or_NULL" > ), > prototype( > all_discrete=list(assays=NULL, colData=NULL, rowData=NULL), > all_continuous=list(assays=NULL, colData=NULL, rowData=NULL), > global_discrete=NULL, > global_continuous=NULL > ), > validity = .valid.Colormap > ) >

Aaron Lun (11:06:36): > which is still pretty clean.

Aaron Lun (11:07:30): > And perhaps theglobalcan be set to the hard-coded defaults in the ECM constructor, to avoid the need to define (and document!) the union class.

Aaron Lun (11:56:14): > iSEE that people enjoy sticking all their sentences onto a single line in the vignette.

Charlotte Soneson (11:57:27): > Ehm, sorry about that. I can split it by sentence.

Aaron Lun (11:57:55): > It’s okay, I’m going through and doing that already.

Aaron Lun (13:14:29): > I’ve reviewed and edited half of it up to the use cases. but I’m pretty pooped now. My major suggestion with the use cases would be to break up the instructions into explicit steps, i.e., 1. Do something, 2. Do some more stuff, 3. Etc.

Aaron Lun (13:16:03): > I also commented out the section discussing theiSEEarguments, as this seemed to be regurgitation of the stuff in?iSEE. While some advice on how to set it up on a remote/Shiny server would be useful, I would put this at the end of the vignette.

Aaron Lun (13:57:45): > Apparently browsers don’t allow opening of local files:https://stackoverflow.com/questions/5246292/open-local-folder-from-link - Attachment (stackoverflow.com): Open local folder from link > How can I open a local folder view by clicking on any link? I tried many options like Open folder or Open folder…

Aaron Lun (13:57:53): > So we’ll just have the web vignette then.

Aaron Lun (13:58:24): > Well, it’s not impossible, just not viaon.click.

Aaron Lun (14:05:24): > Now enabled viabrowseURL. Note that this requires your installation to actually have the vignette; it seemsR CMD INSTALLwon’t build the vignette, you’ll have to BUILD then INSTALL if you’re working on the command line. Don’t know what Rstudio does, maybe it does it both automatically.

Federico Marini (14:11:23): > nice workaround

Federico Marini (14:12:00): > are you about to merge soon into master or is more coming?

Aaron Lun (14:12:10): > Nope, will merge once CI clear.

Aaron Lun (14:12:11): > s

Federico Marini (14:12:50): > okiedokie. I’ll probably stick then to this latest version

Aaron Lun (14:27:25): > merged. Check everything is fine for your presentation tomorrow.

Aaron Lun (14:27:29): > I’m going home now.

Federico Marini (14:36:04): > will do

Federico Marini (14:36:19): > but I am quite sure that’ll be fine

Federico Marini (16:10:50): > I saw this back then once

Federico Marini (16:10:58): > but for our effort it is well deserved

Federico Marini (16:10:59): > http://starlogs.net/#csoneson/iSEE

Kevin Rue-Albrecht (17:04:08): > devtools::install(build_vignettes = TRUE) - Attachment: Attachment > Now enabled via browseURL. Note that this requires your installation to actually have the vignette; it seems R CMD INSTALL won’t build the vignette, you’ll have to BUILD then INSTALL if you’re working on the command line. Don’t know what Rstudio does, maybe it does it both automatically.

Kevin Rue-Albrecht (17:11:22): > RStudio doesn’t build the vignette with the build and reload button. But autocomplete makes the above command fairly quick to type and it does the job

Kevin Rue-Albrecht (18:29:03): > Hi all. Just to let you know that i’m aware of the the out-of-bound error about the assay color maps.

2018-01-29

Kevin Rue-Albrecht (02:55:08): > Hi@Federico MariniA far as I can see, I’ve solved all things about theExperimentColorMapand just merged the result tomaster

Kevin Rue-Albrecht (02:56:08): > The version from last night still had issues with it if theECMdidn’t have as many assay colormaps as theSCEhas assays

Kevin Rue-Albrecht (03:30:51): > I suppose you were going to avoid invalid choices in your presentation, or use an older commit. But I think this one may simplify the situation.

Kevin Rue-Albrecht (03:31:23): > Do keep track of an older, stable, that you can revert back to, just in case I missed something

Federico Marini (03:33:58): > I have quite a short time so I would probably focus more on the core functionality, and grab the code charlotte wrote in the vignette to show you can use your fav colors

Kevin Rue-Albrecht (03:42:12): > Ok

Kevin Rue-Albrecht (03:43:49): > I just thought that core functionalities include the redDim coloured by gene expression, and that was breaking easily if the you select assay #3 when the ECM only has 2 defined, for instance

Kevin Rue-Albrecht (03:48:14): > Maybe it’s clearer if you stick with the old vignette, but it might be misleading. Correct me if I’m wrong: the vignette as you still see it returns the actual vector of colours

Kevin Rue-Albrecht (03:55:40): > While the recent updates since yesterday return a function(n) where n is the number of colours requested

Kevin Rue-Albrecht (03:56:27): > (Constant colormaps take the n argument but don’t care about it)

Aaron Lun (04:15:10): > Good work

Aaron Lun (04:19:31): > We’ve hit 500 commits onmaster.

Kevin Rue-Albrecht (04:21:36): > Let me add Good work everyone as well.

Kevin Rue-Albrecht (04:22:29): > I’ve coded a bit late last night, so I appreciate any feedback, and issue reporting, if I missed anything

Charlotte Soneson (04:23:09): > Cool:slightly_smiling_face:It’s looking really nice

Charlotte Soneson (04:24:25): > I was clicking through the app just now and noticed a couple of unexpected behaviours in various parts. I’ll open some issues in the GitHub repo.

Kevin Rue-Albrecht (04:24:42): > awesome, please do

Aaron Lun (04:34:33): > Also, I’m getting two color bars for coldata in the violin plots.

Aaron Lun (04:34:49): > One is the default continuous, the other is viridis.

Kevin Rue-Albrecht (04:34:54): > screenshot?

Aaron Lun (04:35:44): > @Aaron Lunuploaded a file:image.png - File (PNG): image.png

Kevin Rue-Albrecht (04:36:27): > ok, indeed, that sounded like the effect of having two layers linked to different color aesthetics

Kevin Rue-Albrecht (04:37:43): > let me boot up the add to that state and look at the script, i’m pretty sure someaescalls were not in the optimal place yet

Kevin Rue-Albrecht (04:38:51): > you’ve probably figured by now that anaes()call in theggplot() call gets applied to all layers (assuming one left the defaultinherit.aes=TRUE)

Kevin Rue-Albrecht (04:39:15): > and that each layer can override the globalaesor at least add stuff to it

Kevin Rue-Albrecht (04:39:51): > so in this case, it’s a matter of two layers defining different color aesthetics

Aaron Lun (04:40:06): > Um.

Aaron Lun (04:40:08): > If you say so.

Aaron Lun (04:40:18): > I don’t really have a handle on how this ggplot business works.

Kevin Rue-Albrecht (04:42:04): > No worries. I’ll get to it this evening.

Federico Marini (04:43:22): > Checking on the TODO list we set ourselves last week, I guess we pretty much covered it all. The vignette needs some extra pulp in the use case for the CyTOF

Federico Marini (04:43:41): > but for the rest we are at the final polishing

Federico Marini (04:43:49): > or did I oversee something major?

Charlotte Soneson (04:44:04): > I’m on to the CyTOF part, just need to get some data first:slightly_smiling_face:

Aaron Lun (05:42:14): > Bugfix branch can be merged as soon as it passes CI.

Aaron Lun (05:54:41): > I did some modifications to reduce the amount of unnecessary replotting when the brush options update. I’ve checked it out and I’m pretty sure that it works, but everyone should give it some stress tests.

Kevin Rue-Albrecht (07:19:17): > @Charlotte Sonesonwhat is involved in the “CyTOF” part? Vignette and data set? Or are you also looking into a wrapper aroundiSEE()that would preset a good default set of panels and brushing connections?

Charlotte Soneson (07:20:25): > I haven’t started with any actual wrapper. My idea was to define a set of defaults that made sense and start the app from those settings.

Kevin Rue-Albrecht (07:20:55): > ok, i think we’re talking about the same thing, actually

Kevin Rue-Albrecht (07:23:45): > Indeed, we need to define a set ofredDimArgs = ..., colDataArgs = ..., geneExprArgs = ...that’s adequate for startup. > By wrapper, that I mean is that I was thinking about aiSEE_CyTOF(...)function that sets up those defaults, and then returnsiSEE()using those defaults

Kevin Rue-Albrecht (07:28:01): > Nice thing about a wrapper is that one can also preset brushing links across the various plot types

Charlotte Soneson (07:37:04): > Is there a way we could easily export the “current” set of defaults from the app? I mean, if you have a setup that you like and you would like to start the app like that next time (not just make the plots).

Aaron Lun (07:37:22): > This is possible, but the app will stop once you do so.

Aaron Lun (07:37:42): > This is done by returning something from therunAppcall.

Charlotte Soneson (07:38:21): > Ok. It is not accessible in a way that it could be printed out like the plot commands then?

Aaron Lun (07:38:29): > No.

Kevin Rue-Albrecht (07:38:33): > they’re tables, bit tougher

Aaron Lun (07:38:34): > Too many bits and pieces.

Aaron Lun (07:38:52): > Some of the columns are nested lists

Aaron Lun (07:38:59): > and other weird crap e.g. with the brushes.

Kevin Rue-Albrecht (07:39:50): > i’ve been testing the brushing, not exhaustively, but I absolutely love chained brushes. Gotta try ‘branched’ chains soon

Kevin Rue-Albrecht (07:40:03): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-01-29 12.38.17.png - File (PNG): Screenshot 2018-01-29 12.38.17.png

Kevin Rue-Albrecht (07:49:01): > and the panel chart is absolutely amazing looking

Kevin Rue-Albrecht (07:55:57): > I love the branched stuff too. > I guess we’ll have to crowdsource the ‘stress test’ to real users soon. Too many combos to test:laughing:

Aaron Lun (07:59:25): > I’ll put together a draft of an email to BioC-devel, once I finish cleaning upscater’s vignette.

Aaron Lun (07:59:31): > Ugh.

Aaron Lun (09:09:08): > See draft here:https://docs.google.com/document/d/19OlHIlBS-e3RGjaEUEFptKRY1u3sdvyw0agH8rZvieA/edit?usp=sharing

Aaron Lun (09:09:25): > You can comment if you like.

Federico Marini (09:15:20): > added a couple of notes

Federico Marini (09:15:38): > it was already good anyway:slightly_smiling_face:

Charlotte Soneson (09:18:23): > Looks good to me too.

Charlotte Soneson (09:18:55): > Only thing I was wondering was whether we want a broader focus (’omics instead of single-cell ’omics) in the first paragraph

Federico Marini (09:19:21): > yep

Federico Marini (09:19:34): > we should also decide what the official acronym will be for

Federico Marini (09:19:55): > SummarizedExperiment/SCE would catch them all

Aaron Lun (09:55:59): > Just put it as SummarizedExperiment, I think.

Kevin Rue-Albrecht (09:59:00): > yep I kept struggling with theiSCEEacronym that anSCEshould make

Kevin Rue-Albrecht (10:06:39): > Great draft email. I’ve offered a handful of superfluous edits.

Aaron Lun (10:29:55): > Okay, everyone have a look through before we go through with it.

Aaron Lun (10:30:09): > Also check that the latest release from github is working!

Aaron Lun (10:30:20): > I wonder whether we should label it.

Aaron Lun (10:31:48): > Have a look at the “release” section on GItub.

Kevin Rue-Albrecht (10:33:43): > yep - I think it’s worth branding this release either alpha or beta

Kevin Rue-Albrecht (10:34:17): > A couple more comments on the email (my PhD supervisor taught me well how to be pedantic about details)

Aaron Lun (10:36:27): > You know what, I don’t think the feature/gene thing matters.

Kevin Rue-Albrecht (10:36:33): > I think I’m good with the email now. Considering it’s Bioc-devel, I’m sure “feature selection” will be clear to most people

Aaron Lun (10:37:00): > Because we have hardcoded “gene statistics table” anyway.

Aaron Lun (10:37:17): > And being general at this point would just confuse people.

Kevin Rue-Albrecht (10:37:35): > hm you’re right about that

Kevin Rue-Albrecht (10:38:28): > maybe just describing it with a use case would be clear than trying to cover it with an all-encompassing description

Aaron Lun (10:38:51): > For an email? Don’t worry about it.

Aaron Lun (10:45:32): > I won’t send this out until the double color bar gets fixed, I’ve just seen a bug myself.

Charlotte Soneson (10:57:03): > The double color bars seem to be one for color (viridis), one for fill (default).@Kevin Rue-Albrecht, would addingscale_fill_*in addition (and equal) toscale_color_*destroy anything else?

Kevin Rue-Albrecht (10:58:26): > Arf yes ok. Good to remind me. Can’t do it at work today, too much to do. If no one fixes it before, I’ll look at it tonight. Best I can do

Kevin Rue-Albrecht (10:59:42) (in thread): > not sure what you mean by “destroy”, but my intuition would be to solve this by adding afillscale equal to thecolourscale indeed

Kevin Rue-Albrecht (10:59:51) (in thread): > ah i get what you meant now

Kevin Rue-Albrecht (10:59:59) (in thread): > dunno if it would destroy anything else

Charlotte Soneson (11:00:54) (in thread): > I didn’t look through the rest of the code yet to see if anything else would be affected with regards to the colormaps, or if there was a reason not to setscale_fill_*

Charlotte Soneson (11:01:13) (in thread): > Was just wondering if anything struck you immediately

Kevin Rue-Albrecht (11:01:14) (in thread): > I can’t say unless I look at the code. I could only guess that I’m not expecting to break anything, because colour and fillshouldbe coordinated

Kevin Rue-Albrecht (11:01:51) (in thread): > as far as I’m aware we haven’t implemented any situation where fill and colour can be controlled separately

Charlotte Soneson (11:12:55): > Just addingscale_fill_*seems to work. I’ll push this to thecharlotte_fixesbranch and merge it

Kevin Rue-Albrecht (11:13:05): > cool, thanks for taking care of it

Federico Marini (11:35:35): > Hi, quickly noting down the feedback after todays presentation

Kevin Rue-Albrecht (11:36:00): > in the channel?

Kevin Rue-Albrecht (11:36:20): > you may want to use the “+” button on the left to write a “Post”

Federico Marini (11:36:35): > relevant for next development, I got not that much - apart from the question from my mentor nr. 2 “who will take care of the maintainance and or implement new features”

Kevin Rue-Albrecht (11:36:37): > that’ll make it easier to pin it and find it again

Federico Marini (11:36:39): > uh

Federico Marini (11:36:52): > too bad it is not that much much to be worth a post:stuck_out_tongue:

Kevin Rue-Albrecht (11:37:04): > ahhh

Kevin Rue-Albrecht (11:37:12): > in that case, go Davis-style:wink:

Federico Marini (11:37:15): > more like “how do i install it” - they have some data, and like to try it out.

Aaron Lun (11:37:28): > Just ask them “Do you even R?”

Federico Marini (11:37:44): > some nice jawdropping after they notice that the plots are exactly reproduced

Kevin Rue-Albrecht (11:37:49): > hahaha

Federico Marini (11:38:03): > (which made me innerlyandouterly smile smile)

Kevin Rue-Albrecht (11:38:11): > i’m still amazed myself by the feature to be honest

Federico Marini (11:38:57): > I told them to visit the repo and open an issue if they come across some interesting feature request

Federico Marini (11:39:25): > and then the procedure would be something like reaching a critical mass of users that want it, or having us already wanting it

Federico Marini (11:40:37): > apart from that, mostly people presenting project ideas for a coordinated grant proposal, but at its nascent state still

Kevin Rue-Albrecht (11:40:58): > Fair enough. Maybe we’ll have to think about sub-labels for issues, to deal with them efficiently.

Federico Marini (11:41:32): > Let them come first:slightly_smiling_face:I saw a lot of time people telling you “yes I’ll do this and that” and then not doing this and that

Aaron Lun (11:41:43): > PR or nothing.

Federico Marini (11:42:23): > hopefully suggestions will not come only on the[whatever stupid error generated by me not knowing R]basis

Federico Marini (11:43:07): > but anyway, I felt good in giving the overview. Works, scaled well on the TCGA dataset to have quite immediate re-plot

Federico Marini (11:43:48): > one interesting thing I heard of

Federico Marini (11:44:06): > a professor in CS here is developing some ‘mapping’-ish algorithm

Federico Marini (11:44:34): > that seems to work ~10 times faster than kallisto, and with better precision-recall than rapmap2

Federico Marini (11:44:42): > no preprint

Federico Marini (11:44:44): > no repo

Federico Marini (11:44:47): > yet, at least

Federico Marini (11:45:09): > it is probably in need of further benchmarking

Aaron Lun (12:01:16): > For some inexplicable reason, changing the color from or to “None” destroys the brush.

Aaron Lun (12:01:19): > in violin plots.

Aaron Lun (12:02:08): > And only in violin plots, which is weird.

Aaron Lun (12:11:11): > For reasons I don’t understand, adding a legend to the violin plot seems to destroy the brush.

Aaron Lun (12:15:54): > Same with removing the legend.

Kevin Rue-Albrecht (12:16:19): > removing what legend?

Aaron Lun (12:16:27): > for the color on the violin plot.

Kevin Rue-Albrecht (12:16:53): > ah i get you now

Aaron Lun (12:16:54): > Try opening it upon the allen dataset; brushing somewhere on the coldata plot; and then changing thec olor by to something else.

Aaron Lun (12:17:29): > The problem is at theinputlevel; something with the creation of the violin plot is clearing the brush.

Aaron Lun (12:19:05): > The annoying this is that it does actually get plotted correctly - and then it gets destroyed.

Kevin Rue-Albrecht (12:21:13): > makes me wonder if we should add adebug=FALSE|1|2|3|...option to the app, that wouldmessage()out different levels of info at runtime

Kevin Rue-Albrecht (12:22:19): > things like names of functions being called, orclearing brush for plot %smight come in handy

Kevin Rue-Albrecht (12:23:22): > The connection are still (relatively) clear in our mind right now, but i’m thinking in 6 month time, and when we add new features

Aaron Lun (12:24:19): > Well, that’s fine and all, but that’s not the problem right now.

Aaron Lun (12:24:38): > How is this possibles?

Kevin Rue-Albrecht (12:24:54): > not the immediate problem, but my point was that it might have helped you track down the source of the bug

Aaron Lun (12:33:37): > This is fully attributable to the violin plots - it doesn’t happen for anything else.

Charlotte Soneson (12:48:07): > I can reproduce this, but I am wondering if it is actually plotting the correct thing first. To me it looks like only the outer rectangle is retained, not the actual brushing (the filled thing), and the outer rectangle is lagging a bit also if you drag the brush around.

Aaron Lun (12:48:43): > The lag is to be expected, it’s replotting the outer box every time, remember.

Charlotte Soneson (12:49:34): > Yes, what I meant was that I am not sure it is actually plotting the brushing correctly when you change the coloring, to me it looks like it is just the outer box remaining

Charlotte Soneson (12:49:56): > And then, since the brush is gone, also the outer box goes

Aaron Lun (12:50:15): > The behaviour for the reduced dimension plots is the correct one; both the inner and outer boxes stay.

Aaron Lun (12:51:29): > Finally, I got it to stay; something to do with the aes in the initialggplotcall.

Aaron Lun (12:51:57): > Now let me restore the commands I deleted and see if it helps.

Aaron Lun (13:00:45): > Well, I don’t know how I fixed it, but I did.

Aaron Lun (13:01:05): > Seems like the initialggplot(plot.data, aes)was causing the problem.

Aaron Lun (13:01:22): > Why?shrug

Kevin Rue-Albrecht (13:01:54): > I won’t try to guess that one

Aaron Lun (13:04:45): > Here’s a wild guess; when we ran the original command,ggplotactually makes two plots, which have completely different coordinate systems.shinytries to apply the brush on the first plot, but because the coordinate system is so different, the brush just gets wiped out (as it doesn’t lie within the x/y-axis limits). Upon creation of the final plot, the brush no longer exists.

Kevin Rue-Albrecht (13:05:06): > ah

Aaron Lun (13:05:11): > Completely wild guess.

Aaron Lun (13:05:26): > Now, by removing the initialaes, we avoid any hypothetical double-plotting.

Aaron Lun (13:05:57): > God.

Kevin Rue-Albrecht (13:07:04): > I like that explanation. Wonder how many other Easter eggs like this we’ll have to chase in future plots

Aaron Lun (13:07:25): > Anyway, do we need to setFillBy?

Aaron Lun (13:15:47): > And is data always inherited down the chain of ggplot commands?

Charlotte Soneson (13:18:16): > From theggplot(), not from onegeomto another

Aaron Lun (13:18:25): > Hm.

Aaron Lun (13:18:32): > Okay, well, I’m surprised that it works then.

Aaron Lun (13:18:51): > Oh, actually, it’s fine.

Aaron Lun (13:19:02): > The data is passed correctly, it’s just the aes that I removed.

Aaron Lun (13:37:56): > Okay, bugfixes in a PR.

Aaron Lun (13:39:53): > I won’t be at my computer tomorrow, so could you guys fiddle with the patched version and see if it breaks?

Charlotte Soneson (13:52:09): > Sure

Kevin Rue-Albrecht (13:54:33): > I was actually asked tonight to write the instructions to install iSEE for a few earlier adopters in Oxford. Will be nice to have extra hands on deck for testing

Aaron Lun (13:54:57): > Charlotte, did we manage to get an app on a shiny server?

Aaron Lun (13:55:04): > As in, an outward-facing server?

Aaron Lun (13:55:09): > Or is yours still internal?

Charlotte Soneson (13:55:51): > Our is still on the internal one. Do we still want one (I thought it was mainly for Federico’s presentation, which would have been too tight)?

Aaron Lun (13:56:25): > Hm. Well, any presentations I do will have to be on my mac, and it creaks at the seams when I ask it to runiSEE.

Aaron Lun (13:56:55): > I mean, during our latest skype, everything stopped and I could only hear your voices.

Kevin Rue-Albrecht (13:57:13): > Is it too big forshinyapps.iofree plan?

Charlotte Soneson (13:57:17): > Ok. I wonder how difficult it would be to put it onshinyapps.io

Charlotte Soneson (13:57:19): > Exactly:slightly_smiling_face:

Aaron Lun (13:57:41): > What’s the limitations?

Kevin Rue-Albrecht (13:57:44): > I’m on my way home. Let me try after dinner

Kevin Rue-Albrecht (13:57:53): > App size and number of CPU

Aaron Lun (13:58:20): > Ha, someone could just run our app for >25 hours per month.

Aaron Lun (13:58:25): > and it would shut down.

Aaron Lun (13:58:28): > Lol

Kevin Rue-Albrecht (13:58:34): > Arghh forgot that one

Charlotte Soneson (13:58:47): > Yes…but if we use it for demonstrations we don’t have to give away the address:slightly_smiling_face:

Aaron Lun (13:58:51): > Yes, that’s true.

Kevin Rue-Albrecht (13:58:55): > Well. Exactly

Aaron Lun (13:59:08): > Well, we’d have to change the address every time, because they would see it on the screen, rigth?

Aaron Lun (13:59:16): > :slightly_smiling_face:

Charlotte Soneson (13:59:35): > But they could anyway only explore the Allen data set or whatever we choose to deploy it with…

Kevin Rue-Albrecht (13:59:40): > How about embedding in an iframe for presentations?

Aaron Lun (13:59:58): > Okay… this all seems a bit too much. I’ll see how far I can go on the mac.

Kevin Rue-Albrecht (14:00:51): > Anyway. I don’t think anyone would play much with theshinyapps.iomuch

Charlotte Soneson (14:01:06): > No, me neither, not if they can’t look at their own data

Aaron Lun (14:01:48): > I’m thinking of the guy who will use play with it one hour per day, just to bring it down.

Aaron Lun (14:01:49): > I would.

Kevin Rue-Albrecht (14:01:52): > Plus there’s a number of concurrent users too I think

Kevin Rue-Albrecht (14:02:13): > BiocTroll package?

Aaron Lun (14:04:48): > I have thought about writing a function that effectively deletes the home directory, and sneaking it into.onLoad.

Aaron Lun (14:04:55): > Many lols to be had.

Kevin Rue-Albrecht (14:08:48): > “You’re home directory has been deprecated”

Kevin Rue-Albrecht (14:11:52): > Just crossed my mind: we’re already four developers/maintainers. Pretty sure we can host ashinyapps.ioeach to increase the chances having one not trolled empty at any time

Federico Marini (14:15:53) (in thread): > you can get far away enough:slightly_smiling_face:

Federico Marini (14:16:05) (in thread): > but I have to say, I also am using my private one

Federico Marini (14:16:21) (in thread): > we get some crappy other stuff as default for the institute

Federico Marini (14:17:19): > check out the evilR package for that@Aaron Lun

Federico Marini (14:17:27): > plenty of nasty ideas

Federico Marini (14:17:31): > let me check the link

Federico Marini (14:18:02): > https://romain.rbind.io/blog/2017/05/28/turn-r-users-insane-with-evil/ - Attachment (romain.rbind.io): Turn R users insane with evil > Romain François. Consulting Datactive

Charlotte Soneson (14:21:46): > Seems you can set passwords for apps onshinyapps.io:slightly_smiling_face:

Federico Marini (15:49:57): > -> done editing the introjs steps, removed the references to the now gone buttons

Federico Marini (15:50:30): > now merging intomaster

Kevin Rue-Albrecht (16:19:08): > There are a few missing importFrom things btw. I’m adding them in now (e.g.scale_color_manual).

Aaron Lun (17:19:45): > I notice that my commit to fix the violin plots also wiped out the use offill_set. Is settingFillByandfill_setnecessary for violin plots?

Aaron Lun (17:20:16): > I mean, the fill color would only occur in very rare circumstances - when all the points in a given group have the same colour.

Aaron Lun (17:21:25): > I can’t imagine that this would occur enough to warrant using the fill.

Aaron Lun (17:21:42): > But if people disagree, then you’ll have to manually change thefill = FALSEback tofill = fill_set.

Kevin Rue-Albrecht (17:24:48): > hmm.. let me play with app. For the sake of argument i immediately wonder about people who would colour and group thing by the same factor. Just to have a ‘cute’ simultaneous violin and jitter. Is that what you’re thinking about?

Kevin Rue-Albrecht (17:25:59): > ah ok, i see what you mean. at the moment violins are not filled at all. ok

Kevin Rue-Albrecht (17:26:44): > They look good like this. Users can grab the code and fill it themselves I guess. We’ll giv’em pencils and tell them not to colour outside the lines.

Aaron Lun (17:33:43): > Okay. I suggest getting rid of all incidences offill_set, then, to avoid confusion later.

Aaron Lun (17:34:35): > In addition, now that all arguments are inparam_choices, we can refactorplotting.Ragain for greater simplicity.

Aaron Lun (17:35:06): > This will eliminate the need for the wackycolor_FUNbusiness that was previously constraining us.

2018-01-30

Kevin Rue-Albrecht (03:58:30): > I’ll have to update the ECM validation function tonight. I just realised that I’m catching invalid colormaps (not functions) at runtime only

Kevin Rue-Albrecht (04:01:01): > And for the alpha I don’t think we need this, but I’ll probably add some setters to the ECM so that to edit a colormap one doesn’t have to create a new one from scratch or directly fiddle with the slots

Aaron Lun (04:17:44): > Fix your bug and we’ll proceed with the allpha; don’t worry about new features at this point.

Kevin Rue-Albrecht (08:55:02): > Quiet day it seems. Is this the last bug/issue that we’re aware of?

Aaron Lun (08:55:38): > Well, I haven’t been messing with it, can’t do anything on the mac.

Kevin Rue-Albrecht (08:55:53): > If anyone is interested, I’d appreciate feedback on theExperimentColorMapin terms of usability and intuitiveness at the command line .

Kevin Rue-Albrecht (08:56:15): > I’m biased into using it ‘correctly’ as I know what it expects

Kevin Rue-Albrecht (08:56:35): > let me know if more informative error messages are needed for instance

Kevin Rue-Albrecht (08:57:11): > for example, at the moment, I put a simplestopifnotif a colormap function… isn’t a function

Kevin Rue-Albrecht (08:57:52): > although that’s a poor example as I will move this to check systematically all colormaps in the class validity method tonight

Aaron Lun (08:58:30): > I can have a look at it tonight. Push back alpha to tomorrow, then?

Aaron Lun (08:58:39): > Give everyone a chance to break the interface.

Kevin Rue-Albrecht (08:59:05): > Yep. I’m putting together dozens of figures in Illustrator for a report today:sleepy:

Kevin Rue-Albrecht (09:00:14): > But I’m also scribbling my to-do list and roadmap for fixing up the ECM tonight

Federico Marini (09:01:20): > no need to come up with the logo yet, I assume?:slightly_smiling_face:

Kevin Rue-Albrecht (09:01:57): > what happened to the draft logo that you sent? what kind of quality/filetype is it

Kevin Rue-Albrecht (09:02:15): > found it again, png

Federico Marini (09:02:22): > uh that was a combo of screenshots, very primordial

Federico Marini (09:02:49): > so i guess png as a final screenshot

Federico Marini (09:02:55): > but I have the “source” in ppt

Federico Marini (09:02:56): > :smile:

Kevin Rue-Albrecht (09:03:04): > hm.. i liked the left lense already, really nice tSNE layout of the TCGA

Kevin Rue-Albrecht (09:03:31): > ideally, i’d rather have a proof of the logo in vector graphics than PPT/PNG

Kevin Rue-Albrecht (09:05:24): > The right lens of the glasses needs updating, we’ve changed the appearance of the plot since then. Would you like to play with the app, find a good-looking plot, and then fiddle with the output script to generate some high-quality PDFs?

Kevin Rue-Albrecht (09:06:42): > I remember Aaron knows Inkscape well. I’ve got Illustrator over here. We can get the different items together in a high-res logo pretty quick I think

Federico Marini (09:27:23): > I’ll play around with some plots later tonight

Federico Marini (09:27:44): > and then have the code saved for reproducibility:slightly_smiling_face:

Kevin Rue-Albrecht (09:29:45): > This app is a dream seriously. So glad the group of us got on this together. Wouldn’t have been the same without any of us.

Aaron Lun (09:29:55): > Agreed.

Aaron Lun (09:30:16): > Also, as I said before, I think the logo should go into the “About iSEE” modal. Plenty of space there so you can make it as pretty as you want.

Aaron Lun (09:30:44): > I also think we should allow users to modify the title, so that people will know what they’re looking at for hosted apps on servers.

Kevin Rue-Albrecht (09:31:07): > Over and beyond: we could make it a GIF in the modal with data moving around, or brushing

Kevin Rue-Albrecht (09:31:50): > But a good static one is a perfect start, obviously

Aaron Lun (13:55:00): > Holy shit, I’m almost at 400 commits this month.

Aaron Lun (14:33:35): > I’ve run through a whole bunch of clicking and I’m happy with the interface. At some point we should draw up a list of expected outcomes from user actions - I’m not sure the vignette is detailed enough for this (and it probably shouldn’t be, as we’ll be getting VERY technical).

Aaron Lun (14:35:01): > There are only two issues; one is that for some reason, the brushing select-by-plot options don’t open at the right place, but this is pretty hard to reproduce so I’ve just left it.

Aaron Lun (14:35:31): > The other is that the color legend changes upon subset by restrict, if some colors no longer exist in the subset. Not sure whether this is desirable or not.

Kevin Rue-Albrecht (14:42:55) (in thread): > ‘Not sure whether this is desirable or not’ either, but it would be very simple to fix thanks toggplot. As long as the level is not dropped from the factor, allscale_*take the optiondrop=FALSEto preserve the legend in this kind of scenarios

Aaron Lun (14:43:58) (in thread): > Hm. Okay. Well, we’ll let it go for now, and see if anyone complains. They probably will.

Charlotte Soneson (14:54:09): > I just got an example CyTOF data set from Lukas for the vignette (basically the one Gosia and he used in the BioC workflow), together with all the code to generate it from the raw data (also mostly from the workflow). Below is a screen shot of loading a subset into iSEE (5000 cells, so I could calculate t-SNE quickly). Does anyone have an opinion of how to provide the data for the vignette (in the package, to download from somewhere)? I looked through BioC packages and I couldn’t really find one with a good, real example CyTOF data set that we could use as easily as the Allen scRNA-seq data. The .rds file of this subset is 1.4MB.

Charlotte Soneson (14:54:22): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-01-30 at 20.40.38.png - File (PNG): Screen Shot 2018-01-30 at 20.40.38.png

Federico Marini (14:55:35): > looks nice:slightly_smiling_face:

Federico Marini (14:55:48): > host it on google drive?

Federico Marini (14:55:52): > provided in the pkg?

Federico Marini (14:56:17): > separate pkg? or get it from the workflow? or even better, via ExperimentHub as recipe?

Charlotte Soneson (14:56:59): > Yeah, I was thinking about a “CyTOF example data set package” but the problem is that I guess it will take too long:slightly_smiling_face:

Charlotte Soneson (14:57:08): > It will not be available on BioC when we submit

Aaron Lun (14:57:24): > The problem is that cytof data doesn’t have a repository ala GEO or ArrayExpress

Aaron Lun (14:57:27): > Cytobank doesn’t count.

Charlotte Soneson (14:58:11): > I don’t know abouthttp://flowrepository.org/ - Attachment (flowrepository.org): FlowRepository > FlowRepository is a public database of flow cytometry experiments where you can query and download data collected and annotated according to the MIFlowCyt standard. It supports storage, annotation, analysis, and sharing of flow cytometry datasets.

Federico Marini (14:59:12): > is the construction possible from the workflow?

Federico Marini (14:59:18): > if following instructions

Charlotte Soneson (14:59:46): > Lukas put the code here:https://github.com/lmweber/CyTOF-example-databut yes, it is basically code from the workflow - Attachment (GitHub): lmweber/CyTOF-example-data > CyTOF-example-data - CyTOF example data sets: BCR-XL

Aaron Lun (15:02:08) (in thread): > Interesting. But we would ideally have something backed by a big institution e.g. NIH or EMBL.

Aaron Lun (15:02:20) (in thread): > Small repositories have a habit of disappearing when the money runs out.

Charlotte Soneson (15:02:28) (in thread): > yes, true

Federico Marini (15:02:50): > I’d say we pack it in?

Federico Marini (15:03:03): > or we link externally to the googledrive file?

Aaron Lun (15:04:42): > Pack it intoiSEE? God no.

Aaron Lun (15:04:51): > Easier to make an ExperimentHub package.

Aaron Lun (15:04:57): > Provided it’s not too big.

Aaron Lun (15:06:20): > Are there any cytometry datasets already in experiment packages?

Aaron Lun (15:06:31): > Surely there must be something being used to test the flowCore stuff.

Aaron Lun (15:06:52): > EvenflowCoreitself had a small dataset inside it, if I remember correctly.

Charlotte Soneson (15:08:29): > Yeah, there is something there, and something incytofkit. I was mostly trying to link to the workflow and to a data set where we know something about the populations (manual annotation etc)

Aaron Lun (15:11:24): > Okay. But whatever you decide to do: I’ll just really not like to put any data iniSEE.

Aaron Lun (15:11:51): > I’m going home now, but rack up any bug reports on GH if you can’t deal with them yourself.

Aaron Lun (15:12:08): > If we’re all green, let’s go for the alpha tomorrow.

Kevin Rue-Albrecht (15:27:18): > Coming in a bit late: i looked for “cytof” in theexperimenthublast week and didn’t come up with anything in there. I would be in favour of uploading it in there, it’s good experience for whoever of us does it, and guarantees Bioc support

Federico Marini (15:27:31): > BTW, working on the two lenses of the glasses now

Federico Marini (15:27:38): > yes I also favor the EH way

Federico Marini (15:28:25): > I indirectly contributed to the EH1 recipe back then. I sent in some code to Sonali, who then took care of the whole rest. So i do not know the exact steps taken later

Kevin Rue-Albrecht (15:29:06): > I’ll get on theECMaspects now

Kevin Rue-Albrecht (15:31:17) (in thread): > well, the HTML vignette of the ehub seems pretty helpfulhttp://bioconductor.org/packages/release/bioc/vignettes/ExperimentHub/inst/doc/CreateAnExperimentHubPackage.htmlMakes clear that a Bioc member needs to be contacted, apparently Lori now

Federico Marini (15:35:30) (in thread): > Then Lori it will be:slightly_smiling_face:

Federico Marini (15:35:38) (in thread): > practical we met her in Cambridge

Kevin Rue-Albrecht (15:37:03) (in thread): > yeah it’s always nice to put a face on a name, and meet in person

Federico Marini (15:44:16) (in thread): > Glasses: to be found here:

Federico Marini (15:44:17) (in thread): > https://pixabay.com/en/fashion-glasses-hipster-optics-1295985/ - Attachment (pixabay.com): Free Image on Pixabay - Fashion, Glasses, Hipster, Optics > Download free pictures about Fashion, Glasses, Hipster, Optics from Pixabay’s library of over 1,300,000 public domain photos, illustrations and vectors - 1295985

Federico Marini (15:44:27) (in thread): > with CC0 license

Charlotte Soneson (16:07:41): > Maybe I should check with Lukas for the ExperimentHub thing since he prepared the data. But in any case it will not be up before the alpha release, so perhaps we still have to put it somewhere (like Google Drive) for now.

Kevin Rue-Albrecht (16:12:10): > Google drive or Dropbox should be fine indeed. It’s all documented in section ‘Using online file sharing systems’ of the vignette

Kevin Rue-Albrecht (16:15:38): > btw, I haven’t documented something that will probably confuse many users as it did for me: “copy Dropbox link” puts in the clipboard something likehttps://www.dropbox.com/…?dl=0. > To programmatically fetch the data at that link, the finaldl=0should be edited todl=1.

Kevin Rue-Albrecht (16:16:12): > Didn’t know how to write that clearly at the time. But maybe just the above message would be enough. Opinions?

Kevin Rue-Albrecht (16:21:50): > On a separate note, for anytestthatenthusiast out there: it seems that theexpect_*functions cannot handle comparison of functions when called from thecovrpackage: > I was testing the colormaps returned in various scenarios against the hard-coded default values and: > - tests were passing when run at the prompt in RStudio > - tests passed when called through thetestthatpackage: > > > test_dir("tests/testthat") > ✔ | OK F W S | Context > ⠼ | 5 | 0 > ══ Results ══════════════════════════════════════════════════════════════════════════════════════════════ > Duration: 0.2 s > > OK: 5 > Failed: 0 > Warnings: 0 > Skipped: 0 > > - tests were failing if called bycovr::package_coverage():target, current do not match when deparsed

Kevin Rue-Albrecht (16:24:13) (in thread): > maybe something to do withhttps://github.com/r-lib/covr/issues/248 - Attachment (GitHub): Problem using covr in testthat testcases · Issue #248 · r-lib/covr > Hi, As part of my package’s testthat test suite, I would like to include testcases for code coverage (covr version 2.2.2), e.g. that the average code coverage is over 90%. I have written a simple f…

2018-01-31

Charlotte Soneson (03:56:29): > I was just trying to set the starting configuration for the CyTOF example, and everything works fine until I try to define the brushing relationships. The problem is in.sanitize_memory, but I’m afraid that I’m not exactly following what is being checked there (l. 153-157,misc.R).:disappointed:I’m most likely missing something obvious, but why is it “bad” if the specified plot is inbrush_names?

Charlotte Soneson (03:56:38): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-01-31 at 09.11.39.png - File (PNG): Screen Shot 2018-01-31 at 09.11.39.png

Kevin Rue-Albrecht (04:22:39): > heyyyy - i got that same error too!

Kevin Rue-Albrecht (04:22:51): > except it was 20 rows to replace 10

Kevin Rue-Albrecht (04:22:58): > so it’s a problem of doubling somewhere

Kevin Rue-Albrecht (04:23:26): > i tried placing lots ofprintdebug around the place, yet couldn’t find where it happens

Kevin Rue-Albrecht (04:25:00): > let me find my config, although I got too bold and tried to define some values dynamically. I thought I was the problem when I got the error

Kevin Rue-Albrecht (04:27:54): > here is mine: > > iSEE_CyTOF <- function( > se, > redDimMax = 1, > colDataMax = 1, > geneExprMax = min(10, nrow(se)/2), > geneStatMax = min(10, nrow(se)/2), > initialPanels = DataFrame( > Name = c( > sprintf("Gene expression plot %i", seq(1,min(3,geneExprMax),1)), > sprintf("Gene statistics table %i", seq(1,min(3,geneStatMax),1)), > sprintf("Reduced dimension plot %i", 1), > sprintf("Column data plot %i", 1) > ), > Width = c( > rep(3, min(3,geneExprMax) + min(3,geneStatMax)), > 4,4 > ) > ), > ... > ){ > message("redDimMax: ", redDimMax) > message("colDataMax: ", colDataMax) > message("geneExprMax: ", geneExprMax) > message("geneStatMax: ", geneStatMax) > print(initialPanels) > > redDimArgs <- redDimPlotDefaults(se, redDimMax) > colDataArgs <- colDataPlotDefaults(se, colDataMax) > geneExprArgs <- geneExprPlotDefaults(se, geneExprMax) > geneStatArgs <- geneStatTableDefaults(se, geneStatMax) > > # prepare geneExprArgs > geneExprArgs$XAxis <- "Gene text" > geneExprArgs$YAxis <- "Gene text" > geneExprArgs$XAxisGeneText <- rownames(se)[seq(1,nrow(geneExprArgs)*2,2)] > geneExprArgs$YAxisGeneText <- rownames(se)[seq(2,nrow(geneExprArgs)*2,2)] > geneExprArgs$BrushByPlot <- c("", sprintf("Gene expression plot %i", seq(1,2,1)), rep("",nrow(geneExprArgs)-3)) > geneExprArgs$BrushEffect <- c("","Restrict", "Color", rep("",nrow(geneExprArgs)-3)) > print(geneExprArgs) > print(dim(geneExprArgs)) > iSEE( > se=se, > redDimArgs=redDimArgs, > colDataArgs=colDataArgs, > geneExprArgs=geneExprArgs, > geneStatArgs=geneStatArgs, > redDimMax=redDimMax, > colDataMax=colDataMax, > geneExprMax=geneExprMax, > geneStatMax=geneStatMax, > initialPanels=initialPanels, > ... > ) > } > > iSEE_CyTOF(sce) >

Aaron Lun (04:29:08) (in thread): > Suggest testing evaluation of the functions for a few inputs, e.g., N=1, 3, 5, 10

Aaron Lun (04:36:05): > Bugfix up.

Aaron Lun (04:44:21): > Okay, now actually fixed.

Aaron Lun (04:45:54): > It should have removed names that were not amongst the existing panels.

Charlotte Soneson (04:50:04): > Yes, that does indeed make more sense:slightly_smiling_face:I can create the panels and brushing relations now:+1:

Aaron Lun (05:08:23): > Are we otherwise good to go?

Charlotte Soneson (05:09:11): > I’m extending the vignette, but otherwise I would say yes

Aaron Lun (05:10:21): > Will you be done soonish, or should we just do it?

Charlotte Soneson (05:11:37): > I plan to be done today, but I have a meeting in a little while and I don’t know if I’ll be done before that. Maybe we can just do it now, it is easy for people to reinstall later…

Aaron Lun (05:12:15): > Let me review the current status of the vignette…

Aaron Lun (05:13:37): > I will clean up the allen formatting and will go ahead.

Aaron Lun (05:13:57): > Also, I noticed this:sce1@assays@.xData$data$exprs. Urgh.

Aaron Lun (05:14:13): > because clearly,exprs(sce1)doesn’t look smart enough.

Kevin Rue-Albrecht (05:29:45): > i’m happy with the state in which I brought things last night, and you all seem to have deep-tested the various kinds of interactions between brushes. > The CyTOF section stills stops in the middle of a sentence, Are we extending it or removing it until we have resolved the data set availability?

Aaron Lun (05:32:14): > Suggest commenting it out for the time being.

Charlotte Soneson (05:33:07): > Fine with me

Aaron Lun (05:36:18): > When you compile your vignettes, doesinteractive()actually work? My vigentte compilation freezes, presumably because it actually tries to open the app.

Aaron Lun (05:39:28): > Also, the ECM fails when not all rowData, colData, and assays are specified inall_continuous.

Aaron Lun (05:39:32): > Don’t even know what rowData is.

Aaron Lun (05:39:48): > ah, actulaly nvm.

Kevin Rue-Albrecht (05:47:51) (in thread): > how do you compile them?

Kevin Rue-Albrecht (05:48:27) (in thread): > i usedevtools::install(build_vignettes=TRUE)and never had a problem

Kevin Rue-Albrecht (05:49:20) (in thread): > can you elaborate on your “ah, actulaly nvm.“?

Kevin Rue-Albrecht (05:50:07) (in thread): > is there still a bug? do I throw an invalid error? or does it make sense in the end?

Kevin Rue-Albrecht (05:55:52) (in thread): > oh noo. it is indeed a bug

Kevin Rue-Albrecht (05:56:04) (in thread): > i thought I had this one solved last night

Kevin Rue-Albrecht (05:56:06) (in thread): > damn

Aaron Lun (05:57:08) (in thread): > Oh, I thought it was okay.

Aaron Lun (05:57:29) (in thread): > Just came back from the toilet.

Kevin Rue-Albrecht (05:58:00) (in thread): > well, the whole point of.sanitize_controlled_colormapswas to set missing color maps inall*

Aaron Lun (05:58:02) (in thread): > R CMD build

Kevin Rue-Albrecht (05:58:57) (in thread): > I think I pinpointed the issue

Kevin Rue-Albrecht (05:59:06) (in thread): > hang on

Kevin Rue-Albrecht (05:59:28) (in thread): > Yep: bug only happens when callingnew

Kevin Rue-Albrecht (06:00:02) (in thread): > if you call theExperimentColorMapconstructor, it handles it the way I meant

Kevin Rue-Albrecht (06:01:52) (in thread): > ahhh i think i know how to handle that

Kevin Rue-Albrecht (06:02:12) (in thread): > ah. no.

Aaron Lun (06:02:52) (in thread): > Well, NVM. People callingnewshould know what they’re doing.

Kevin Rue-Albrecht (06:03:05) (in thread): > I guess we should demonstrate theExperimentColorMapconstructor in the help page rather than thenewmethod

Aaron Lun (06:03:56) (in thread): > Yes, I’ve changed this in the vignette.

Kevin Rue-Albrecht (06:04:21) (in thread): > do you wanna do man pages too?iSEEandECM-class?

Kevin Rue-Albrecht (06:04:36) (in thread): > I was about to start but i need to get going for other stuff now

Aaron Lun (06:04:59) (in thread): > I can… but I would like to reduce the size of the ECM example in?iSEE. Seems better to have a comprehensive example in the ECM man.

Aaron Lun (06:15:33): > I’ve noticed that the text keeps on getting contracted to 80 lines. Why is this?

Kevin Rue-Albrecht (06:17:09) (in thread): > absolutely

Kevin Rue-Albrecht (06:19:01) (in thread): > I think the one in iSEE doesn’t need all theassaysthings anyway: one would be plenty enough

Charlotte Soneson (06:19:04): > which text? 80 lines or lines of length 80? The latter is what BiocCheck wants, right:wink:I don’t think I have anything setup to automatically change the line length though.

Aaron Lun (06:19:15): > Lines of width 80.

Aaron Lun (06:19:23): > And BiocCheck is stupid on this.

Aaron Lun (06:19:34): > Who has screens that small?

Aaron Lun (06:19:54): > Text is… okay. But code doesn’t make any sense when split across lines.

Charlotte Soneson (06:20:05): > Haha, I don’t know. But you have to fit several panels next to each other in RStudio…

Kevin Rue-Albrecht (06:20:12): > It might be my RStudio. I eventtually manage to tell it ‘2-tab indents’, but I don’t remember touching the line width, so it might still be at 80

Aaron Lun (06:20:16): > Don’t get me started on Rstudio.

Kevin Rue-Albrecht (06:21:22): > If I remember correctly, the 80 char thing is historical. Something about the first screens only showing that many. But yeah.. I’d pity anyone who still has a screen like that

Aaron Lun (06:22:13) (in thread): > I fleshed out the ECM explanation in the vignette so I removed the ECM definitions in?iSEEcompletely.

Aaron Lun (06:24:01): > Why do we need to import viridisLite? Shouldn’t viridis be sufficient?

Aaron Lun (06:25:23): > Also, it doesn’t seem like RColorBrewer is actually used in the package itself, suggest moving it to Suggests.

Kevin Rue-Albrecht (06:28:52): > Good question aboutviridisLite.R CMD checkcomplained about not finding theviridisfunction until I addedviridisLite. Weirdly theviridisfunction is exported by both.

Aaron Lun (06:32:36): > Hm. Well, I’ll moveviridisto Suggests andviridisLiteto Imports.

Kevin Rue-Albrecht (06:34:27): > Fair enough. I haven’t tried all combinations, maybe that one will work. Note thatcheckmay complain if you import from a package inSuggests. I importviridisfrom both in theNAMESPACE

Kevin Rue-Albrecht (06:34:44): > anyway, i’m sure you’ll figure it out:wink:

Aaron Lun (06:36:02): > <!channel>Alpha going out before lunch. Final comments.

Kevin Rue-Albrecht (06:44:55): > good point removing the ECM altogether in ?iSEE

Aaron Lun (06:46:51): > In the ECM man page, does"undefined"refer toall_discreteorall_continuous? This would be dangerous if there is actually a field named"undefined"; suggest putting a separate flag or accessor, e.g.,undefined=TRUEorcolDataUndefinedColorMap.

Aaron Lun (06:47:11): > I have had numerous problems with cleaning upscater’s code because of issues like this.

Kevin Rue-Albrecht (06:47:34): > No sorry, misleading then: it was meant to be an example of try to access a color not defined in the ECM

Kevin Rue-Albrecht (06:48:03): > to demonstrate how it falls back through the hierarchy rather than crashing

Aaron Lun (06:48:16): > okay.

Kevin Rue-Albrecht (06:48:20): > should probably be prefaced by a comment then

Aaron Lun (06:48:33): > Yeah

Aaron Lun (06:48:46): > Or name it something silly, like"blah"so people can’t get confused.

Kevin Rue-Albrecht (06:49:36): > well.. that was the point of"undefined"… before we introduced theall_*slots

Kevin Rue-Albrecht (06:50:04): > there will always be confused people, unfortunately, one way or another

Aaron Lun (06:53:04): > I’m happy with deployment, once the latest PR merges. Though I have a couple of cosmetic issues that I’ll post on GH.

Kevin Rue-Albrecht (06:54:34): > Just found: open the vignette from within the app crashes if the vignette wasn’t built. Error message:Warning: Error in browseURL: 'url' must be a non-empty character string

Kevin Rue-Albrecht (06:54:52): > We could probably catch that up with avalidate

Aaron Lun (06:55:06): > Yes, we could; but all installations should have the vignette installed.

Aaron Lun (06:55:14): > As in, all official insallations via bioclite.

Aaron Lun (06:55:26): > I mean, we can do it (raise a Notification)

Kevin Rue-Albrecht (06:55:29): > My thought as well. Just thought i’d throw it out there anyway.

Aaron Lun (06:59:45): > Okay, protection has been added.

Aaron Lun (07:02:10): > I will merge the PR and write the email after lunch.

Federico Marini (07:28:22): > sorry for joining later, kids were sick and I had <<< time to get busy otherwise

Federico Marini (07:29:08): > I did not have time to check any more bugs, but I am sure we were good in catching already

Federico Marini (07:29:18): > how much do we want the logo for today’s release?

Kevin Rue-Albrecht (07:30:49): > To me, it would only be the cherry on top. I’d rather wait longer to see something as final as possible, than immediately include a work in progress

Federico Marini (07:35:33): > I could not find out yesterday what lens 2 could have been. Although I kind of liked Charlotte’s CD3 vs CD4 abundance

Federico Marini (07:35:57): > for lens 1, I’d have the TCGA ninja-tSNE-glyph

Kevin Rue-Albrecht (07:38:19): > i like that shuriken:grin:

Kevin Rue-Albrecht (07:39:32): > i’ll think about it over lunch and group meeting this afternon

Aaron Lun (07:51:57): > Sending in 10 minutes, unless I’m stopped.

Aaron Lun (07:57:18): > Okay, I need to go, so I’m just going to send it now.

Charlotte Soneson (07:58:07): > Sounds good!

Federico Marini (08:12:01): > feel free to add us in cc so that we get notifications?

Aaron Lun (09:59:57): > I think we should all go out for a drink.

Aaron Lun (10:00:13): > And each of us can imagine the others there.

Charlotte Soneson (10:08:25): > I guess that will work as long as we don’t start talking to the “virtual us”…:slightly_smiling_face:but yes, really good job!

Aaron Lun (10:10:08) (in thread): > Sent it just after C’s reply, so… nope.

Federico Marini (10:13:41): > hey, virtual “colleagues”. proud to be contributing in this

Federico Marini (10:14:18): > the more we drink, the more bugs will be filed in - but this is what we want i.e. outsourcing the debugging:smile:

Federico Marini (10:14:34) (in thread): > :stuck_out_tongue:

Aaron Lun (10:15:45): > We can play a drinking game.

Aaron Lun (10:15:58): > Where the person who wrote the buggy line of code has to buy the next round.

Aaron Lun (10:16:09): > Weighted by the total number of lines contributed, of course.

Federico Marini (10:19:07): > eheheh

Federico Marini (10:19:11): > I’m in

Charlotte Soneson (10:20:19): > Ehm, sure. Drinks are probably most expensive in Switzerland anyway:wink:

Aaron Lun (10:22:47): > I’ll put it on the agenda at the next Bioc meet. Got to wait for those bugs to build up to avoid sampling error, you know.

Federico Marini (10:23:16): > munich prices are not the lowest either but hey

Aaron Lun (12:39:28): > How to turn off geom_violin line color?

Kevin Rue-Albrecht (12:40:02): > aes(colour=...))I believe

Kevin Rue-Albrecht (12:40:14): > as opposed toaes(fill=...))

Aaron Lun (12:40:37): > right.

Aaron Lun (12:40:50): > colour=FALSE in .build_aes?

Aaron Lun (12:40:55): > Let’s see if that works..

Kevin Rue-Albrecht (12:41:09): > yep

Kevin Rue-Albrecht (12:42:24): > I wish I had.build_aesearlier… can’t tell you how often I type what that function returns

Aaron Lun (12:42:56): > Allright, fill in the violin plots has been destroyed.

Aaron Lun (12:43:06): > Now for how to avoid dropping levels from the legend.

Kevin Rue-Albrecht (12:43:25): > scale_*(..., drop=FALSE)

Aaron Lun (13:06:22): > Is this only necessary for manual? Or also for gradientn? And also for fill?

Kevin Rue-Albrecht (13:06:54): > immediate intuition is that it’s for all

Aaron Lun (13:06:57): > Also I remember the reason for fill was to avoid two color legends - how does this work?

Kevin Rue-Albrecht (13:08:29): > i’m pretty sure you needscale_color_manual(..., drop=FALSE)to preserve all you colours if one is absent from the data

Aaron Lun (13:08:46): > Nope, didn’t work.

Kevin Rue-Albrecht (13:09:13): > the other way around i’m not sure how ggplot may complain ifscale_*_manualdoes not provide a colour for every level

Kevin Rue-Albrecht (13:09:18): > uh

Aaron Lun (13:10:12): > Continuous was also very unhappy aboutdrop=FALSE.

Kevin Rue-Albrecht (13:10:19) (in thread): > color``fillandshapeinteract as factors into creategroup(hence thegroupaesthetic to override it if desired

Aaron Lun (13:10:37) (in thread): > jesus.

Kevin Rue-Albrecht (13:10:40): > ah yeah that makes sense for continuous xD

Kevin Rue-Albrecht (13:10:49) (in thread): > but

Kevin Rue-Albrecht (13:11:14) (in thread): > aesthetics that are tied to the same covariate are collapsed into a single legend

Aaron Lun (13:11:37): > Let me rephrase: it works as long as there is at least one point.

Aaron Lun (13:11:46): > Once there’s no points, everything vanishes, which is not entirely desirable.

Kevin Rue-Albrecht (13:11:49) (in thread): > so we made the double legend disappear by making fill the same as colour

Kevin Rue-Albrecht (13:12:00): > argh

Aaron Lun (13:13:19): > Not sure how to fix that, unfortunately.

Kevin Rue-Albrecht (13:13:35) (in thread): > i’d have to look at the code myself - i’m a bit tired now, but almost all aesthetics can be specifiedoutsidetheaescall, if one wishes to set them to a constant value (typical forgeom_point(aes(...), size = ...))

Aaron Lun (13:14:52) (in thread): > Yeah, see if it can be cleaned up.

Kevin Rue-Albrecht (13:15:51): > Yeah. As you say ggplot makes simple things complicated

Kevin Rue-Albrecht (13:16:18): > it’s really smart at figuring out how to draw legends from data, so… take away the data…

Aaron Lun (13:17:52): > I wonder whether we could just add a dummy value toplot.data, somewhere outside the range of the plot.

Aaron Lun (13:18:02): > Trick ggplot into putting something.

Aaron Lun (13:28:05): > @Charlotte SonesonCan you help standardize the usage of transparencies whennotbrushing? Some plots have transparencies by default ingeom_point, while others do not. I guess the simplest and most easily interpretable solution would be to turn transparencies off totally in the absence of a brush; otherwise users may be confused when brushing by transprency. Any suggestions?

Charlotte Soneson (14:15:11): > Right, yes. I was thinking about this earlier today for the CyTOF thing, that in a way it would be useful to have a transparency in the scatter plots there to get an indication about the density, but it would be hard to separate from the brushing effect. So yes, I guess the safest is to turn the transparencies off in absence of brushing.

Aaron Lun (14:19:20): > I’m happy with having the transparencies, but you’ll have to be careful about how they work.

Aaron Lun (14:20:21): > Upon brushing by color, all brushed points should get a solid fill? Or also transparency?

Aaron Lun (14:20:39): > Upon brushing by transparency, brushed points should lose their transparency; this is probably fair enough.

Charlotte Soneson (14:21:38): > But then the original plot and the plot you would get by brushing all points would look different, which I don’t know if it’s desirable

Aaron Lun (14:21:45): > Hm.

Aaron Lun (14:22:30): > Is it undesirable?

Charlotte Soneson (14:22:49): > I don’t know

Charlotte Soneson (14:26:24): > So in that case we’d have have to change the non-brushing transparency in the reduced dimension plots, and harmonize the ones in violins and rectangle plots.

Aaron Lun (14:34:32): > Yep.

Charlotte Soneson (14:39:18): > I’ll look into this.

Kevin Rue-Albrecht (14:39:40): > I was wondering about that too: whether brushing by ‘transparency’ should also apply a ‘restrict’ on the child plots. It’s both fair enough and a bit frustrating that transparent data in the parent plot get highlighted in the child plot

Charlotte Soneson (14:39:46): > I just pushed thecharlotte_fixesbranch, which contains an updated vignette (with the CyTOF example), if anyone wants to have a look

Charlotte Soneson (15:02:38): > Also pushed thetransparencybranch. There, alpha=0.6 everywhere except when receiving a transparency brush, in which case it is set by the brush settings.

Aaron Lun (15:49:57): > I was thinking further about this; we can fob off responsibility to the user, by giving an option to set the alpha in the colour parameters.

Aaron Lun (15:50:32): > This would default to 1, but it would allow the user to turn it down if they wanted.

Charlotte Soneson (15:50:41): > Yes. I guess we need to decide how much we want them to be able to change. What about point size for example?

Aaron Lun (15:51:49): > I did think about this, but the point size is probably no so important?

Charlotte Soneson (15:52:15): > Maybe depends on how many samples/cells you have. I could think that with large data sets our point size is too large

Charlotte Soneson (15:52:26): > And with a bulk data set it is probably too small:slightly_smiling_face:

Aaron Lun (15:52:54): > Probably settable in the command rather than anything else…

Aaron Lun (15:53:18): > Though we could change “Coloring parameters” to “Aesthetic parameters”

Kevin Rue-Albrecht (15:53:37): > I’m not against another button on the interface (in a modal I assume), but we could also add this as a bonus argument to iSEE() that would initialise it to the user’s favorite value (?)

Kevin Rue-Albrecht (15:54:55): > I personally already have my launcher scripts for a couple of data sets, this way I could just tweak those and never have to worry again about changing it in-app/per-app

Aaron Lun (15:58:43): > I think it should be set as an argument on the command line -point.args=list(), extra arguments to be passed togeom_point.

Aaron Lun (15:59:47): > This’ll get deparsed as required (excluding any suppliedalphawhen brushing for transparency). I hope it doesn’t throw up when you specify color here and thenscale_color_*later.

Kevin Rue-Albrecht (16:12:12): > if I follow your last bit, I don’t it would be a massive problem: general settings would applyoutsideaescalls, whilescale_*applytoaesthetics

Kevin Rue-Albrecht (16:12:37): > i’d have to play around to see what happens when one sets both simultaneously, though

Kevin Rue-Albrecht (16:13:33): > but as a general rule, i’d expect the code to switch between the two types of calls

Aaron Lun (17:53:09): > Hm… upon further reflection, I’m not sure it would be wise to let the user tinker with stuff iniSEE().

Aaron Lun (17:53:25): > It would have to really affect visualization to warrant putting it in as an argument.

Aaron Lun (17:53:34): > I mean, what’s next; font size? label size?

Aaron Lun (18:14:32): > But on the other hand, these might be necessary…

Aaron Lun (18:14:42): > Dammit.

Aaron Lun (18:16:01): > Well, if anyone feels like this is necessary, give me an idea of how it woudl fit in with ggplot and what type of extra arguments would be needed iniSEE.

2018-02-01

Kevin Rue-Albrecht (03:39:21): > Another desirable feature that just came back to mind: upon brushing a message under the plot “n of N data points selected (x%)”

Kevin Rue-Albrecht (03:53:28): > @Aaron LunI’ll think more and wrote a proper suggestion about ggplot later but I’d say iSEE() should also accept a sort of global setting argument to store things valid across multiple plots of the same type, and maybe a last one across all plot types

Kevin Rue-Albrecht (03:54:53): > I can’t really really predict all the ggplot side though. If you set up the infrastructure as you previously did, I can pick it up and apply it. It’s worked so far:)

Kevin Rue-Albrecht (03:57:46): > I’m sure Charlotte will have some good idea about it too, if I miss something

Aaron Lun (04:25:41): > Can someone remind me whatscale_size_areadoes?

Aaron Lun (04:26:57): > I’m looking at it in the gridplot command, and I am not sure why it is there.

Charlotte Soneson (04:37:18): > The help saysscale_size_areaif you want 0 values to be mapped to points with size 0…otherwise I don’t know, it’s not something I’ve ever used

Aaron Lun (04:38:08): > ???

Aaron Lun (04:38:37): > In any case, I’ve found Yet Another ggplot Unexpected Behaviour (YAGUB for short).

Aaron Lun (04:39:17): > Will elaborate once I get back from a summons from the boss

Kevin Rue-Albrecht (04:55:17): > scale_size_areais part of the family withscale_sizeandscale_size_areaI remember suggesting it. but can’t remember exactly for what purpose now

Kevin Rue-Albrecht (04:55:39): > i think the size of the boxes

Kevin Rue-Albrecht (04:56:09): > i have do dash to a genomics forum in 2 min, but let me look at the code

Charlotte Soneson (05:00:44): > For the additionalggplotoptions, to me it seems that the problem is perhaps not to give it toiSEE(in the end, it will translate to additional columns of thegeneExprArgsetc, right?) We also don’t have much currently in thetheme, so there could be another function setting up that, using the provided defaults (it all has to be in the sametheme(...)I think, to avoid overwriting). For the integration, the risk is perhaps to clutter the interface, and that if you provide some ways of fiddling, people will start wondering why they can’t doallthe things they want:wink:

Charlotte Soneson (05:02:10): > One thing that we could address if we do it is the overlapping of axis labels for e.g. the violin plot (if there are many/long group names), by allowing the user to rotate the labels

Aaron Lun (05:22:55): > Well, putting that aside, let’s fix this first:

Aaron Lun (05:23:14): > 1. Load theallendata set from?iSEE.

Aaron Lun (05:23:59): > 2. Set up the column data plot to group bydissection_s.

Aaron Lun (05:24:11): > 3. Set up the column data plot receive a brush from the reduced dim plot.

Aaron Lun (05:24:21): > 4. Set up to brushing to restrict in the column data plot.

Aaron Lun (05:24:43): > 5. Select the brush in the reduced dim plot, starting from (5, -5) and all the way down to the bottom right corner.

Aaron Lun (05:25:11): > You will notice that the widths of the violin plots expand beyond an acceptable range. The question is, how do we control the maximum width of the violins?

Charlotte Soneson (05:25:11): > Oh…

Charlotte Soneson (05:30:20): > Settingwidth=1ingeom_violin?

Charlotte Soneson (05:31:47): > or maybe slightly smaller

Charlotte Soneson (05:35:35): > seems default width is 0.9

Aaron Lun (05:37:51): > I don’t even see awidthargument ingeom_violin.

Charlotte Soneson (05:38:01): > There is one, but apparently it is not documented:slightly_smiling_face:

Aaron Lun (05:38:07): > Typical.

Charlotte Soneson (05:38:16): > Just addingwidth = 0.9togeom_violin()seems to do it

Aaron Lun (05:38:39): > The vipor offsets have width=0.4. So would width=0.8 be better?

Charlotte Soneson (05:39:57): > Yeah, maybe this is the reason that the violins were a bit outside the points in the TCGA data? On the other hand, for smaller data sets it looks like a part of the point may end up looking like it’s outside the violin if it is narrower than 0.9.

Aaron Lun (05:40:21): > Hm.

Aaron Lun (05:40:28): > Do we still needscale='width', then.?

Charlotte Soneson (05:40:37): > Yes, otherwise they will scale by area

Aaron Lun (05:40:43): > Okay.

Charlotte Soneson (05:47:44): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-02-01 at 11.47.02.pngand commented: This is what happens withwidth=0.8. It agrees with the width of the point centers, but some part of the points fall outside - File (PNG): Screen Shot 2018-02-01 at 11.47.02.png

Aaron Lun (05:48:07): > width=0.9 is still not working for me with the commands I reported above. Are they working for you?

Charlotte Soneson (05:48:19): > Yes

Aaron Lun (05:48:49): > Dammit

Charlotte Soneson (05:48:53): > I changed lines 317-319 inplotting.Rto

Charlotte Soneson (05:48:58): > > plot_cmds[["violin"]] <- sprintf( > "geom_violin(%s, alpha = 0.2, data=plot.data, scale = 'width', width = 0.9) +", > .build_aes(color = FALSE, group = TRUE) >

Charlotte Soneson (05:49:02): > And that works

Aaron Lun (05:49:47): > Hm. Can you commit a fix on your end then? Do it frombugfix, as I’ve refactored everything (again).

Charlotte Soneson (05:51:33): > pushed tobugfix

Aaron Lun (05:53:18): > Hm. Don’t know how it worked, but it did.

Aaron Lun (05:54:53): > BTW, does the loading bar help at all for the cytof stuff?

Charlotte Soneson (06:02:29): > Right, I can’t see the loading bar…where should I look?

Charlotte Soneson (06:05:26): > Oh, now I see it:slightly_smiling_face:but not on startup, right?

Charlotte Soneson (06:06:08): > Doesn’t really make a big difference, rendering the plots is pretty fast

Aaron Lun (06:07:14): > Yeah, I thought so.

Aaron Lun (06:07:21): > It should be only present on startup.

Aaron Lun (06:07:28): > But I guess that was a waste of time.

Kevin Rue-Albrecht (06:09:46) (in thread): > @Charlotte Soneson@Aaron Lunthat’s the thing: i don’t think ‘global’ arguments should get neargeneExprArgs, as that would create unnecessary redundancy. As for the ECM, I would have expected a hierarchy of ‘fallback’ options, each stored in a different, progressively smaller, data frames

Aaron Lun (06:10:06) (in thread): > Yes, global arguments will go somewhere else.

Aaron Lun (06:10:23) (in thread): > But not via a fallback system, that would be a real pain in the ass.

Aaron Lun (06:10:30) (in thread): > Especially when things change dynamically.

Kevin Rue-Albrecht (06:10:57) (in thread): > yep, needs some careful planning before implementation

Kevin Rue-Albrecht (06:11:23) (in thread): > still only throwing ideas as my time is fairly still limited these days

Kevin Rue-Albrecht (06:15:10): > I think it will become more useful when we get to much bigger data sets that would require stuff as downsampling for instance

Aaron Lun (06:17:26): > The question is; would figuring out the points to downsample take as much time as plotting them anyway?

Aaron Lun (06:17:55): > Intelligent downsampling would need to be density-aware, requiring approximately NlogN time.

Aaron Lun (06:18:00): > Whereas just plotting them should be a linear operation.

Kevin Rue-Albrecht (06:21:35): > Well, to be honest, I wouldn’t considering ‘rendering’ as part of any progress bar in our app. That’s more ggplot’s problem, ours is to supply a decent amount of data. > Progress bars are more useful to display progress through analytical steps: e.g. ‘collating data’, ‘identifying axes range’, ‘downsampling’, ‘post-processing’, …

Kevin Rue-Albrecht (06:22:57): > not sure how much experience you have with progress bars, but inTVTB, I used that to increment the progress bars through 3-4 major data processing steps that could take some time, but never had to worry about the rendering. I think that’s our situation here too

Kevin Rue-Albrecht (06:24:13): > if you want to check it out:https://github.com/kevinrue/TVTB/blob/459b69f8211125427de6c66b034203fa47485110/inst/shinyApp/server.R#L450

Kevin Rue-Albrecht (06:24:40): > and have a look at theincProgresscommands

Aaron Lun (06:24:41): > The problem is that almost all of the evaluations are done in theeval.

Kevin Rue-Albrecht (06:24:57): > argh. yes. sorry. I keep forgettign that

Aaron Lun (06:25:17): > There’s only one place where insertion can be performed; after the firstevalto obtain X/Y/ColorBy.

Aaron Lun (06:25:24): > But I can’t imagine that would take particularly long…

Aaron Lun (06:25:46): > Unless we get into disk-backed operations, but that’s another story.

Kevin Rue-Albrecht (06:25:49): > … I’m curious to see if we can place theincProgressstatements in the evaluated command, and wrap all that in awithProgress

Aaron Lun (06:26:36): > We could, provided we passed in thesession. Not sure it’s worth it, though.

Aaron Lun (06:27:10): > Assuming that the major slowdowns will be in generatingplot.data, we should only needincProgressin between the twoevalblocks.

Federico Marini (06:30:05): > (side note: good catch on place 1 for the bioc devel daily digest, aaron:slightly_smiling_face:)

Aaron Lun (06:30:27): > oh - uh, yes, that was all part of my plan.

Federico Marini (06:30:31): > plus, we started some socialmedia-ads with out twitters

Federico Marini (06:30:42): > should we notify also the general channel here?

Aaron Lun (06:31:15): > Not sure that’s necessary… though if we were to do it, we should have done this yesterday.

Aaron Lun (06:31:31): > Now it just seems a bit weird, like an afterthought (which it is).

Federico Marini (06:34:23): > :stuck_out_tongue:

Federico Marini (06:34:56): > we say something like “instead of nothing, it’s better instead of”:smile:

Charlotte Soneson (07:50:20) (in thread): > Hmm…I see the point, but wouldn’t a hierarchy of data frames be more difficult to keep track of than just another bunch of columns in thegeneExprArgsDataFrame? Most of the rows there will be identical anyway (at least to start with), and it would be immediate to allow users to change the plots independently, or set a global default at startup. Or is the main issue then that you can’t make global changes while running the app?

Kevin Rue-Albrecht (07:58:54) (in thread): > Well, I think global changes would be possible, albeit not necessarily straightforward to implement. My motivation would rather for our own sanity, to keep separate things that are controlled in different ways; better said, to group things that are controlled in similar ways (e.g. individual plots, plot type, across plot types)

Charlotte Soneson (11:56:15): > Anyone has an opinion on the CyTOF example (in thecharlotte_fixesbranch)? I put the data file on Dropbox for now, we have started to put together a CyTOF data package but it will take some time. If you prefer we can keep it commented.

Federico Marini (11:56:53): > Did not check yet, I’ll take a look

Federico Marini (11:57:01): > is the EH way too complicated?

Charlotte Soneson (11:57:11): > No, that’s what we are doing

Charlotte Soneson (11:57:19): > But it still needs a package

Federico Marini (11:57:23): > ah ok

Federico Marini (11:57:37): > thought it could “simply be a recipe”

Charlotte Soneson (11:57:43): > I can also put the file on our server.

Charlotte Soneson (12:23:46): > BTW, now that it is released, we may want to start bumping the version number when we change things (and adding things to the NEWS file)?

Aaron Lun (12:24:22): > Meh.

Aaron Lun (12:24:36): > Feel free to knock up the version, as long as it’s below 0.99.0

Aaron Lun (12:25:03): > Also, suggest moving NEWS to inst.

Charlotte Soneson (12:26:32): > Just thinking that it might be easier to track bugs etc if not everything is from the same version…but maybe it’s unnecessary?

Aaron Lun (12:26:41): > Well, that may be true.

Aaron Lun (12:27:14): > Maybe any PR can result in a bump, though this would get us into pretty large numbers pretty quickly.

Kevin Rue-Albrecht (12:30:07): > Version bumps with PR is probably sensible, provided the PR do something notable (i.e., not a typo in a help page). Minor edits should probably be merged with only a new bullet point in theNEWS

Kevin Rue-Albrecht (12:30:53): > this way the minor edits get distributed as part of the next ‘notable’ update

Aaron Lun (12:32:26): > I mean, in practice, people should only be downloading the alpha release.

Aaron Lun (12:32:36): > And we would tag new releases as we go along.

Aaron Lun (12:32:51): > But I guess people would just godevtools::install_github("csoneson/iSEE")in reality.

Kevin Rue-Albrecht (12:33:38): > exactly, that would match better the Bioc way of propagating new releases (alpha, and later tags)

Kevin Rue-Albrecht (12:34:22): > the devtools way would be for us and people who don’t mind testing the latest code

Aaron Lun (15:18:22): > Looking at thescatercode currently.

Aaron Lun (15:18:34): > If I see a long Roxygenated file with multiple user-level functions, I will scream

2018-02-02

Kevin Rue-Albrecht (06:07:57): > Hey all, a bit off topic here, but did anyone recently play with R=3.4? > I’m getting the following error: > > > biocLite("SingleCellExperiment") > BioC_mirror:[https://bioconductor.org](https://bioconductor.org)Using Bioconductor 3.5 (BiocInstaller 1.26.1), R 3.4.3 (2017-11-30). > Installing package(s) 'SingleCellExperiment' > Warning message: > package 'SingleCellExperiment' is not available (for R version 3.4.3) > > while the package should be available for that version of R:https://bioconductor.org/packages/release/bioc/html/SingleCellExperiment.html

Charlotte Soneson (06:09:22): > I think you need to update Bioconductor to 3.6 (the current release)

Kevin Rue-Albrecht (06:10:39): > arf.. that makes sense! i knew it was starting me in the face

Kevin Rue-Albrecht (06:10:45): > thanks!

Kevin Rue-Albrecht (06:12:51): > oh boy.. updating all the packages now:sweat_smile:thanks anyway! I really got used to being on the devel branch all the time that I forgot how to behave as a user

Federico Marini (06:14:38): > users will be users:slightly_smiling_face:

Federico Marini (09:52:04): > I’m not saying we should introduce bugs on purpose

Federico Marini (09:52:17): > but I kinda miss the conversations here on the channel

Kevin Rue-Albrecht (09:52:24): > hahahaha

Kevin Rue-Albrecht (09:53:55): > sorry I was being selfish kept a discussion aboutshinyapps.ioon a direct conversation with Charlotte. I’ll be sure to share on the channel next time:stuck_out_tongue_winking_eye:

Charlotte Soneson (09:54:46): > Shall we start thinking about the paper?:upside_down_face:

Charlotte Soneson (09:55:11): > Just to have something to talk about:joy:

Kevin Rue-Albrecht (09:55:54): > Bottomline is that the free plan is likely too restricted to even host theallendemo. I’ve managed to deploy the app through a few hacks, but the app page displays at best an “out of memory” error. Charlotte found out that thediamonddemo data set of R already uses about 100 MB

Federico Marini (09:56:12): > wtf

Kevin Rue-Albrecht (09:56:23): > and the free plan offers at most 1GB of memory

Aaron Lun (09:57:05): > Deep in a dogfight with scater’s plotting functions right now.

Aaron Lun (09:57:11): > Won’ tbe responsive until it’s over

Federico Marini (09:57:14): > the only problem is R-devel - I also have a shiny server I could use for deployment

Federico Marini (09:57:52): > if I enter the sacrilegious territory of downgrading the requirement

Federico Marini (09:58:03): > we could be set

Federico Marini (09:58:19): > it is not the most powerful server, this I should say upfront

Kevin Rue-Albrecht (09:59:56): > Speaking of manuscript, I dug up the manuscript that I optimistically submitted as an application note to Oxford Bioinformatics a few years back, for GOexpress. We ended up publishing a more fleshed out version to BMC bioinformatics. Anyway. I made a few points about data viz and multifactorial experimental designs in there that could be reused to describe applications of iSEE.

Kevin Rue-Albrecht (10:00:11): > Shall I share the word file here as an attachment, or by email?

Charlotte Soneson (10:01:10): > If everyone is fine with writing in a Google Doc, it could be pasted directly there?

Federico Marini (10:01:29): > fine for me

Kevin Rue-Albrecht (10:01:29): > Not a bad idea indeed.

Charlotte Soneson (10:01:33): > Or Overleaf, if we are going LaTeX

Kevin Rue-Albrecht (10:02:28): > Good excuse for me to sign up for Overleaf. I’ve been curious about it

Charlotte Soneson (10:03:16): > I don’t know if it’s possible to see what other people are doing in reasonable real time on Overleaf, but it would be more practical for submission to Bioinformatics at least.

Kevin Rue-Albrecht (10:04:09): > Which reminds me, before I make any rushed assumption: are we decided for an application note (2 pages) to Oxford Bioinformatics?

Kevin Rue-Albrecht (10:04:31): > or do we want to flesh out something longer and/or another journal?

Charlotte Soneson (10:05:30): > I’m fine with anything, but it feels more like a short thing to me, unless we want to become philosophical:slightly_smiling_face:

Kevin Rue-Albrecht (10:06:10): > Yep. I personally don’t see how we could make a Original Research paper out of it, to be honest

Aaron Lun (10:06:26): > I would go with Google docs

Aaron Lun (10:06:32): > overleaf is a real pain in the ass

Aaron Lun (10:06:42): > Either that or a git latex

Charlotte Soneson (10:06:57): > I think git LaTeX would be a bit of a pain too

Aaron Lun (10:07:01): > really?

Aaron Lun (10:07:08): > It’s the best setup I’ve had for technical people.

Charlotte Soneson (10:07:17): > I like that you can see everyone’s cursor in a Google Doc, so you are not working on exactly the same place at the same time

Charlotte Soneson (10:07:35): > git works if one at the time is writing

Aaron Lun (10:07:44): > Well, how about we start drafting in docs and move to git once we’re closer to completion.

Charlotte Soneson (10:07:50): > Sounds good

Aaron Lun (10:07:56): > But in any case, we’re too far off- still need to implement proper tests.

Aaron Lun (10:08:06): > And actually submit to bIOc-devel

Federico Marini (10:08:46): > what we can start doing anyway would be to collect a couple of references - especially of our “concurrence”

Federico Marini (10:09:09): > which as of now mostly consists of commercial suites, anyway:smile:

Kevin Rue-Albrecht (10:10:46): > Well, for what it’s worth I’ll upload my old manuscript to Google Docs, just so that we can all look up the handful of (potentially) reusable ideas/phrases. Don’t make me say that it’s a scaffold for our manuscript, far from it:sweat_smile:Then, we can just start the real manuscript wherever is most convenient for us

Kevin Rue-Albrecht (10:13:59): > here goes:https://drive.google.com/open?id=1MF5FNdWx6QJ9xYBoNywe7_gkGSPUIH3v

Kevin Rue-Albrecht (10:14:45): > @Kevin Rue-Albrechtshared a file:RueAlbrecht_et_al.(Bioinformatics)_2014-10-09_FINAL.doc - File (Word Document): RueAlbrecht_et_al.(Bioinformatics)_2014-10-09_FINAL.doc

Aaron Lun (10:18:46): > Hm… I dunno… first author looks a bit suspicious, if you ask me.:slightly_smiling_face:

Kevin Rue-Albrecht (10:19:00): > maybe that’s why they refused it:wink:

Aaron Lun (10:19:07): > lol

Federico Marini (10:19:17): > dammit Kevin

Federico Marini (10:19:29): > you should keep the surname cut to Rue

Federico Marini (10:19:38): > look how much space it ate up with the extra line

Federico Marini (10:19:57): > HASHTAG APPLICATIONS NOTE RULES

Federico Marini (10:20:04): > :smile:

Kevin Rue-Albrecht (10:20:08): > First author isn’t enough for me, I want the full first line of the author list:stuck_out_tongue_winking_eye:

Federico Marini (10:20:29): > it could have even worked

Kevin Rue-Albrecht (10:20:32): > Wait until I put my middle name in there:stuck_out_tongue:

Federico Marini (10:21:36): > it is not Maximilian or some other longer ones right?

Kevin Rue-Albrecht (10:21:49): > close enough (to the length): Christophe

Kevin Rue-Albrecht (10:23:31): > http://www.historyrundown.com/top-5-people-with-the-longest-names/Didn’t know Picasso’s full name was ”Pablo Diego José Francisco de Paula Juan Nepomuceno María de los Remedios Cipriano de la Santísima Trinidad Ruiz y Picasso”

Charlotte Soneson (10:24:35): > But he’s not on our paper, right?

Federico Marini (10:24:57): > well we could

Kevin Rue-Albrecht (10:25:06): > well… wearedoing (data) visualisation

Charlotte Soneson (10:25:10): > I don’t think our plots are really his style

Federico Marini (10:25:14): > geom_cube

Charlotte Soneson (10:25:25): > Haha yes, maybe those

Federico Marini (10:25:26): > coming up in the next ggplot release

Kevin Rue-Albrecht (10:26:51): > we could always set the default random seed to Picasso’s birth year or something iniSEE^^

Federico Marini (10:27:59): > for-ty-two! for-ty-two!

Kevin Rue-Albrecht (10:28:43): > “The Hitchhiker’s Guide to Genomics with iSEE”

Kevin Rue-Albrecht (10:30:24): > … could be a good title for the vignette, come to think of it:joy:

Federico Marini (10:33:06): > BTW, trying to test iSEE with some other data, did you already try to plug in the 10x neurons set?

Federico Marini (10:33:10): > at least the subset of it

Kevin Rue-Albrecht (10:34:36): > Not yet. I keep thinking about this density-density downsampling thing that Aaron mentioned before I dare approach the 1.3M data set

Federico Marini (10:35:19): > not that one, probably this would kill many machines

Federico Marini (10:35:45): > I was about to try this one here:

Federico Marini (10:35:45): > https://support.10xgenomics.com/single-cell-gene-expression/datasets/1.3.0/1M_neurons

Federico Marini (10:36:01): > sorry wrong link

Federico Marini (10:36:02): > http://cf.10xgenomics.com/samples/cell-exp/1.3.0/1M_neurons/1M_neurons_neuron20k.h5

Kevin Rue-Albrecht (10:36:38): > ah. i thought there was a misunderstanding when I opened the first link:joy:

Kevin Rue-Albrecht (10:36:45): > ahh the 20k one

Kevin Rue-Albrecht (10:37:05): > yeah, that could be a cool progression from the 8k TCGA data set

Federico Marini (10:39:20): > we go “2x”. AH AH. oooh I need free time

Kevin Rue-Albrecht (10:41:29): > Btw, I just got asked today if iSEE handles microarray data sets. I’m sure that it can, but we should probably document an example. I’ll have a look at theExperimentHub, but suggestions welcome

Charlotte Soneson (10:42:30): > Shouldn’t be a problem I think, there are no count models or anything in there.

Federico Marini (11:28:28): > still not the neurons, still not scaling up. yet, testing it on 10x data

Federico Marini (11:29:05): > and trying to obtain similar stuff tohttp://cf.10xgenomics.com/supp/cell-exp/cellrangerrkit-PBMC-vignette-knitr-2.0.0.pdf

Federico Marini (11:29:26): > > download_sample(sample_name="pbmc3k",sample_dir="10xdata_pbmc3k", > host="[https://s3-us-west-2.amazonaws.com/10x.files/samples/cell/](https://s3-us-west-2.amazonaws.com/10x.files/samples/cell/)") > gbm <- load_cellranger_matrix("10xdata_pbmc3k") > # also compute the logcounts > scepbmc3k <- SingleCellExperiment(list(counts = as.matrix(exprs(gbm)), > logcounts = log2(1 + as.matrix(exprs(gbm))))) > scepbmc3k <- scater::runPCA(scepbmc3k, exprs_values = "counts") > irlba_out <- irlba(scepbmc3k@assays@.xData$data$counts) > tsne_out <- Rtsne(irlba_out$v, pca = FALSE, perplexity = 50, verbose = TRUE) > reducedDim(scepbmc3k, "TSNE") <- tsne_out$Y > colData(scepbmc3k) <- DataFrame(pData(gbm)) > library(org.Hs.eg.db) > genenames <- AnnotationDbi::mapIds(org.Hs.eg.db,keys = rownames(scepbmc3k),column = "SYMBOL",keytype = "ENSEMBL") > genenames <- scater:::uniquifyFeatureNames(ID = rownames(scepbmc3k), names = genenames) > rownames(scepbmc3k) <- genenames > > library("iSEE") > iSEE(scepbmc3k) >

Federico Marini (11:30:09): > this piece of code gets quite close to it (see fig. 2 in their vignette, they put some info on the markers, and I did not have anything for the 20k neurons to check)

Aaron Lun (11:30:40): > scepbmc3k@assays@.xData$data$counts???

Aaron Lun (11:30:51): > becausecounts(scepbmc3k)is too simple, obviously.

Federico Marini (11:30:58): > yop:stuck_out_tongue:

Federico Marini (11:31:20): > they had a complicated class structure

Federico Marini (11:31:38): > I had to get it like this in a previous version. sorry, did not change that line

Federico Marini (11:32:38): > if you see anything to tweak please let me know:wink:

Federico Marini (11:33:28): > for example, naive question: is t-SNE to be applied on the irlba-processed version of the raw counts?

Aaron Lun (11:33:46): > no.

Aaron Lun (11:34:08): > You’ll need to normalize, log-transform, select HVGs and transpose before feeding it into irlba

Aaron Lun (11:34:26): > Pretty sure also that V aren’t the PCs, you have to scale them by D or sqrt(D) (can’t remember which).

Federico Marini (11:35:36): > thanks. I asked because we had a similar chunk inhttps://github.com/csoneson/iSEE/blob/master/vignettes/iSEE_vignette.Rmd#use-case-iii-using-the-experimenthub - Attachment (GitHub): csoneson/iSEE > iSEE - R/shiny interface for interactive visualization of data in objects derived from the SummarizedExperiment class

Federico Marini (11:36:08): > and I am myself not so navigated in the preprocessing of these types of sets

Aaron Lun (11:36:51): > We can skip a lot of the stuff if we just want an example of how it works, though log-transforming and transposing are necessary.

Federico Marini (11:37:57): > Ok, _in my case I just wanted to see if the core findings from their vignette are also doable via iSEE

Kevin Rue-Albrecht (11:38:54): > eh.. that chunk’s my fault (I’ll drink to that tonight :P), once I got the irlba recommendation from Aaron, I didn’t bother to ask how to use it properly ^^

Federico Marini (11:39:08): > do you have a link/vignette for the documentation of the steps you mentioned? (asks while googling for the single cell workflow…)

Aaron Lun (11:40:00): > Yes,https://bioconductor.org/help/workflows/simpleSingleCell/intro

Aaron Lun (11:40:30): > Note thathttps://bioconductor.org/help/workflows/simpleSingleCellis an old version, I’ve asked them to re-direct if possible.

Federico Marini (11:40:59): > excellent, thank you + good to know

Federico Marini (11:57:38): > wow these are quite small bibles, thanks again:wink:

Charlotte Soneson (15:09:30): > Apparently Winston Chang was talking abouthttps://rstudio.github.io/shinytest/articles/shinytest.htmlat RStudioConf today. I guess the talk was streamed (https://www.youtube.com/watch?v=ogy7rHWlsQ8), might be useful to have a look if it is available afterwards - Attachment (YouTube): rstudio::conf 2018 | Official Live Stream

Aaron Lun (17:26:47): > shinytest looks pretty neat, though it’s not on CRAN, which makes it difficult to use for BioC testing.

Aaron Lun (17:27:20): > It also relies on a save state of expected results; for the number of tests we would need to do, that’s going to be pretty large.

Aaron Lun (17:27:45): > I would suggest testing all the internal functions viatestthat, and perhaps having a separate repo for shinytest if we need it.

Kevin Rue-Albrecht (17:28:57): > btw, anyone knows whethersetClasscan be tested? InTVTBI ended up marking them#nocovbecause they I just couldn’t figure out

Aaron Lun (17:29:31): > Are you trying to get 100% code cov?

Kevin Rue-Albrecht (17:29:36): > i suppose they’re run on package load/attach, but never at runtime

Aaron Lun (17:29:46): > We won’t get that anyway, the observers won’t trigger unless the app is launched.

Kevin Rue-Albrecht (17:30:29): > (in TVTB I hit 100%, not that I’m particularly proud of it, in retrospect)

Kevin Rue-Albrecht (17:30:55): > plus, I figured that covering all the lines doesn’t mean they’re covered in all scenarios anyway

Kevin Rue-Albrecht (17:31:45): > (a line that works with a positive value won’t necessarily work withNULL)

2018-02-03

Kevin Rue-Albrecht (07:07:07): > Are we aware of any outstanding bug fix or desirable feature that needs implementing this weekend? > I’m going out for a bit, but I’ll have a bit of time when I get back. > I think we’ve been mentioned things on the channel that aren’t listed as issues on GitHub, but I can’t remember. > - Among the open GitHub issues, there’s Davis’ “info on hover” that I’d like to see. I could get on that. > - I’m also thinking of a little reactivetextOutputthat would displayn of N (x%) data points brushed

Aaron Lun (07:07:38): > I think we need a feature freeze and testing of everything we have now.

Aaron Lun (07:07:50): > But if you are going to add new features, I would suggest thinking about heatmaps.

Aaron Lun (07:08:10): > I have some ideas but probably best to skype about it if you’re interested.

Aaron Lun (07:08:30): > There’s some interesting opportunities for linking to other plots, but it’s not as simple as one might think.

Kevin Rue-Albrecht (07:09:08): > I agree that a new Skype would be good at this point, to reflect on the alpha release and prioritise where to go next

Aaron Lun (07:10:05): > But extending the tests is my first iSEE-related priority for the upcoming week.

Aaron Lun (07:10:25): > I don’t suppose you could give shinytest a run and see if it’s any good?

Aaron Lun (07:10:39): > Anything we do with it would need to be in a separate repo though;

Aaron Lun (07:10:49): > the saved states look like they’d be pretty heavey.

Aaron Lun (07:11:53): > Okay, going to get some food, back in a bit.

Kevin Rue-Albrecht (07:12:07): > I could look at shinytest indeed. Although I should probably makes sure I cover as much of theAllClasses.Ras possible. > Which reminds me, I’ll see if I can sort out integration withcodecov.ioto track coverage better

Kevin Rue-Albrecht (07:13:22): > For those who may not have used it, it reports coverage on a line-per-line basis.

Kevin Rue-Albrecht (07:17:32) (in thread): > @Charlotte Sonesoni think only the repo owner can set up the webhook between GitHub andcodecov.io

Kevin Rue-Albrecht (07:17:50) (in thread): > https://github.com/codecov/example-r - Attachment (GitHub): codecov/example-r > Contribute to example-r development by creating an account on GitHub.

Kevin Rue-Albrecht (07:18:27) (in thread): > something about a token to add in the settings

Charlotte Soneson (07:18:49) (in thread): > Ok. I’m just on my way out to get some food now as well (before the shops close here), but I’ll look into this when I get back.

Kevin Rue-Albrecht (07:19:20) (in thread): > no worries, we can catch up later!

Kevin Rue-Albrecht (08:21:28): > Seems like codecov integration worked:https://codecov.io/gh/csoneson/iSEE/tree/5d0bf6f4e44f7d2ac108cdb6d5fa6ddd13aa046e/R - Attachment (Codecov): Code coverage done right. > Hosted coverage report highly integrated with GitHub, Bitbucket and GitLab. Awesome pull request comments to enhance your QA.

Charlotte Soneson (08:58:30) (in thread): > Does that mean I don’t have to do anything else, or does it still need some activation or something?

Kevin Rue-Albrecht (09:02:18) (in thread): > Apparently nothing else. I hadn’t set anything up in a while on codecov so I was a bit confused when it gave me a “token”

Charlotte Soneson (09:02:54) (in thread): > Ok:+1:

Aaron Lun (10:05:23): > FYI, finished 50% of the scater refactoring. It is… brutal.

Kevin Rue-Albrecht (10:10:51): > hahaha, out of curiosity i had a look at the latest commits, how new is theaesthargument toplotExpressionDefault? I don’t remember seeing it before, but again, I like doing my own ggplots

Aaron Lun (10:11:03): > Well, it’s going to be gone.

Kevin Rue-Albrecht (10:11:07): > lol

Aaron Lun (10:11:12): > Precisely because people can do their own damn ggplots

Aaron Lun (10:11:31): > and it was too much effort to expose all of the scater internals in a coherent way.

Kevin Rue-Albrecht (10:15:00): > speaking of which, I was half-tempted to expose theisColorMapCompatiblefunction that I’ve written as a check before launching theiSEEapp. Users may want to check compatibility outside the app (precisely if they want to use the ECM for their own plots). > However, 1) the function is still pretty raw and would need some cleanup, 2) it should also probably be given a better name and turned into a generic that could check againstExpressionSetfor instance

Kevin Rue-Albrecht (10:26:16): > Alright. codecov badge added. Let’s get that 6% up:slightly_smiling_face:

Kevin Rue-Albrecht (11:02:20): > i’ve come across this little gem, if anyone still has all the remote-tracking branches that have come and gone in the last few weeks:git fetch --prune

Aaron Lun (11:03:26): > sweet

Kevin Rue-Albrecht (11:03:53): > it’ll remove local references to all the branches that don’t exist on GitHub anymore

Kevin Rue-Albrecht (11:22:28): > one note about writing tests, that I just discovered myself:?test_dir > > There are four classes of .R files that have special behaviour: > - Test files start with "test" and are executed in alphabetical order. > - Helper files start with "helper" and are executed before tests are run and from devtools::load_all(). > - Setup files start with "setup" and are executed before tests, but not during devtools::load_all(). > - Teardown files start with "teardown" and are executed after the tests are run. > > I never paid attention to the last 3. We should probably move the definition of test values/objects in “setup_“, to avoid redefining them in individual “test_” scripts

Kevin Rue-Albrecht (11:23:15): > I’m thinking about things like loading or preprocessing anrdsfile

Aaron Lun (11:25:24): > Uh… why would we need to process an RDS file?

Aaron Lun (11:26:00): > It would be helpful to only have to constructsceonce, though.

Aaron Lun (11:26:12): > But a lot of the tests intest_thatwill be far below that level

Aaron Lun (11:26:25): > much more low-level, I would supect.

Kevin Rue-Albrecht (11:27:30): > it should be much lower level, trying to feed as much pre-digested arguments to the low-level functions as possible. > but if I remember correctly some things like the default-generating functions want anSCEto do their job

Aaron Lun (11:28:02): > Yes.

Kevin Rue-Albrecht (11:28:14): > not much preprocessing needed, but as you wrote, we’d rather prepare a single testSCEonly once, and share it across tests potentially distributed across multiple"test_"files

Aaron Lun (11:29:38): > what does devtools::load_all do?

Kevin Rue-Albrecht (11:29:48): > no clue

Aaron Lun (11:30:01): > Because it’s a pretty subtle distinction betwen ehlper and setup files.

Kevin Rue-Albrecht (11:30:01): > (yet)

Kevin Rue-Albrecht (11:31:57): > shameless copy-paste rom the doc: > “load_all loads a package. It roughly simulates what happens when a package is installed and loaded with library”

Aaron Lun (11:32:31): > Hm.

Kevin Rue-Albrecht (11:32:48): > I supposehelpercan rundata(allen)whilesetupcannot

Kevin Rue-Albrecht (11:45:34): > insce <- as(allen, "SingleCellExperiment"), where is theasmethod defined? > > > showMethods("as") > Function "as": > <not an S4 generic function> >

Kevin Rue-Albrecht (11:46:32): > i don’t get why the command only works oncescateris loaded, ifshowMethods("as")returns the above even afterscateris loaded

Aaron Lun (11:49:53): > Well, it should be in methods, right?

Aaron Lun (11:50:00): > SCE is a subclass of SEs, so it’s auto-defined.

Aaron Lun (11:50:05): > No need forsetAs.

Aaron Lun (11:50:09): > I think.

Aaron Lun (11:50:19): > It’s possible that we wrote one, but I don’t remember writing it.

Kevin Rue-Albrecht (11:50:31): > ahh.. autodefined for child classes.. makes sense

Kevin Rue-Albrecht (11:51:37): > nah, I guess you made the right point. I was just used to see something likeinherited from <parent class>, but I guess that only applies if the parent classdoeshave a customsetAsdefinition

Kevin Rue-Albrecht (11:52:19): > in this case, it’s probably just the point of changing the class name, and adding a defaultreduceDimslot

Aaron Lun (11:55:37): > God, Davis writes his code with no defence at all.

Kevin Rue-Albrecht (11:55:53): > as in sanity checks?

Aaron Lun (11:55:56): > all hard-coded variables.

Aaron Lun (11:56:07): > none of which work now, because we changed stuff upstream.

Kevin Rue-Albrecht (11:56:43): > ah yeah. I kept meaning to fix the explanatory variable plot that was hard coded to qc fields*_controlswhilecalculateQCmetricsgenerated*_control

Kevin Rue-Albrecht (11:56:52): > drove our PhD student nuts for a day

Aaron Lun (11:57:03): > lol

Kevin Rue-Albrecht (12:50:47) (in thread): > up to 7.14% (100% of a file covered):tada:

Aaron Lun (12:55:42): > Feel free to put in a PR, I need all the help I can get on this.

Kevin Rue-Albrecht (12:56:17): > well, just looking back at it now, it seemed to be fixed

Aaron Lun (12:56:22): > Once I finish merging the ~50 commits inplot_refactor.

Kevin Rue-Albrecht (12:57:08): > but yeah, your earlier message seemed to indicate that things are going to move quite a bit, so i’d rather wait that you finish doing your magic before looking where I can help

Aaron Lun (12:57:49): > I mean, I had to clear out.Rhistoryfiles that somehow got committed.

Kevin Rue-Albrecht (12:58:23): > i’m kinda doing helping right now: re-compiling a full Rmarkdown website taking SmartSeq2 data from raw counts to manuscript figures using scran, scater and co.

Aaron Lun (12:59:14): > Down to 2 warnings in CHECK…

Kevin Rue-Albrecht (12:59:18): > (since I’m too lazy to switch back to Bioc-release, I’ve been doing this analysis using the bioc-devel version of the packages)

Kevin Rue-Albrecht (12:59:47): > for better and worse, considering I started it before the SCESet-SingleCellExperiment transition

Aaron Lun (13:06:48): > Down to 1 warning…

Kevin Rue-Albrecht (13:15:21): > alright, I’ve collected a bit of information from the Oxford Bioinformatics website here:https://docs.google.com/document/d/1WaiqAeYYg9bv5JK-lAGr8KhU3VezUKV7OWnr70wHG0c/edit?usp=sharing

Kevin Rue-Albrecht (13:15:26): > @Kevin Rue-Albrechtshared a file:iSEE to Oxford Bioinformatics - File (Google Docs): iSEE to Oxford Bioinformatics

Kevin Rue-Albrecht (13:15:55) (in thread): > mostly taken from:https://academic.oup.com/bioinformatics/pages/instructions_for_authors

Kevin Rue-Albrecht (13:16:43) (in thread): > We can add to it as we go along. For the time being I’m diving back into unit tests

Aaron Lun (13:20:14) (in thread): > What bit are you testing now?

Kevin Rue-Albrecht (13:20:48) (in thread): > I was about to look how to testplotting.R, to stick to my field of expertise for the time being

Kevin Rue-Albrecht (13:21:03) (in thread): > but I could also look into this shinytest thing

Aaron Lun (13:21:31) (in thread): > No, that’s good.

Aaron Lun (13:21:37) (in thread): > I was going to ask you to test plotting anyway.

Kevin Rue-Albrecht (13:21:55) (in thread): > I think that makes more sense for now.

Aaron Lun (13:22:10) (in thread): > It would be sufficient to test that the plots are generated without error with all possible specifications; I don’t see a decent way of callingexpect_equalon ggplot objects.

Aaron Lun (13:23:23) (in thread): > Though one way of doing it would be to evaluate the reported commands, to confirm that we get the same ggplot object…

Kevin Rue-Albrecht (13:24:19) (in thread): > That is true as well.

Kevin Rue-Albrecht (13:24:48) (in thread): > Makes me think that if we manage to set up shinytest, it will implicitly test plotting.R

Aaron Lun (13:24:58): > NO WARNINGS, NO ERRORS, SCATER PASSES CHECK!

Aaron Lun (13:25:00): > :sob:

Aaron Lun (13:25:07): > After 20 hours of working on this.

Kevin Rue-Albrecht (13:25:09) (in thread): > still, i think it’s better to testplotting.Routside of the app

Aaron Lun (13:25:36) (in thread): > Yes, we might as well.

Kevin Rue-Albrecht (13:25:37) (in thread): > could disambiguate where issues come from

Kevin Rue-Albrecht (13:25:55) (in thread): > (if it’s a runtime thing, or the functions themselves)

Kevin Rue-Albrecht (13:26:56): > it’s up to you, but that’s the kind of circumstances when i’d crack a beer open ^^

Aaron Lun (13:27:33): > Still need to flesh out the tests tomorrow, but I’m done with that for the day.

Aaron Lun (13:27:44): > Now, to the toilet, and onto a paper I need to review.

Kevin Rue-Albrecht (13:28:00): > bad omen for the paper:joy:

Aaron Lun (13:32:38) (in thread): > Keep me in the loop for how you’re going to set up yourexpect_equalcalls; because the central plotting returns theplot.dataand the commands, there’s a number of things we can check for sanity.

Aaron Lun (13:34:30) (in thread): > I will test the table and brush link updates function, but I might not get to it soon, as I forgot about another project and have to deal with it next week.

Kevin Rue-Albrecht (13:34:48) (in thread): > yeah.. i already hit a wall when I set up the first checks: seems like there is a double-standard between RStudio and a terminal session when testing functions for equality

Kevin Rue-Albrecht (13:36:55) (in thread): > apparentlyexpect_identicalwas happy in RStudio but failed in the terminal and CMD check for a weird reason, trying to reproduce it now

Kevin Rue-Albrecht (14:06:12): > just having a fight with roxygen… which seems to parse files in thetestsdirectory… and somehow complains thatobject 'allen' not found

Kevin Rue-Albrecht (14:07:34): > (after a call todata(allen), obviously, or I wouldn’t report it

Kevin Rue-Albrecht (14:08:55): > i mean, the package builds and works, butR CMD checkandroxygen2::documentfail because of that error

Aaron Lun (14:09:16): > ¯*(ツ)*/¯

Aaron Lun (14:09:34): > Why would CHECK fail?

Kevin Rue-Albrecht (14:09:37): > it’s on thekevin_testsbranch already, if anyone has time to waste on this

Kevin Rue-Albrecht (14:10:13) (in thread): > this one is leaving me even more speechless: > > * checking for file 'iSEE/DESCRIPTION' ... ERROR > Required field missing or empty: > 'Author' >

Kevin Rue-Albrecht (14:11:08) (in thread): > while i can guarantee you that DESCRIPTION hasn’t changed a symbol since master

Aaron Lun (14:12:12) (in thread): > lol

Kevin Rue-Albrecht (14:17:22): > ok… so i just checked outmasterand ranroxygen: no problem > checked outkevin_testsand didroxygen: above error (object 'allen' not found)

Aaron Lun (14:17:51): > Doesn’t likesetuporhelper, I would say.

Aaron Lun (14:17:55): > Try using the other one.

Aaron Lun (14:18:01): > As in,setup.

Kevin Rue-Albrecht (14:18:54): > well.. I’ve been usinghelperonly so far, as it’s supposed to be run in an environment whereiSEEis loaded

Kevin Rue-Albrecht (14:19:01): > but i’ll play around report back

Kevin Rue-Albrecht (14:22:06): > ….:expressionless:…

Kevin Rue-Albrecht (14:22:26): > its frustrating when you’re right all the time, you know that?:stuck_out_tongue_winking_eye:

Aaron Lun (14:22:44): > Not just a pretty face.

Kevin Rue-Albrecht (14:22:46): > changed it tosetupand it worked

Kevin Rue-Albrecht (14:23:21): > point being that I didn’t neediSEEloaded to turnalleninto anSCE

Kevin Rue-Albrecht (14:27:14): > and thatdevtools::documentparses thehelper*files, thereby expecting objects present in those files to be defined later in places where they may not be

Federico Marini (14:44:59) (in thread): > I do know

Federico Marini (14:45:15) (in thread): > we defined the authors with the authors@R

Kevin Rue-Albrecht (14:45:21) (in thread): > don’t worry about this

Federico Marini (14:45:26) (in thread): > and that is not liked by R cmd check

Federico Marini (14:46:04) (in thread): > this is general for any other package

Federico Marini (14:46:20) (in thread): > sometimes I tried to do the checking outside RStudio but end up having to rely on it

Federico Marini (14:46:28) (in thread): > or at least on devtools::check

Aaron Lun (14:46:29) (in thread): > Should be fine after BUILD.

Federico Marini (14:46:37) (in thread): > most likely, yes

Federico Marini (14:47:09): > One thing that could be relevant for us

Federico Marini (14:47:27): > what conferences are you going to attend this year?

Federico Marini (14:47:57): > and related to this: are we fine in presenting iSEE to bigger audiences? (I think so)

Aaron Lun (14:53:17): > Happy with you guys presenting this, I probably won’t though.

Aaron Lun (14:53:37): > because I’m a conference party maniac

Kevin Rue-Albrecht (14:53:56) (in thread): > anyone coming to the Oxford Single-Cell Symposium this year? I think in May

Kevin Rue-Albrecht (14:54:20) (in thread): > last year Rahul Satija was keynote

Aaron Lun (14:55:53): > and will probably be too wasted to do a good job

Kevin Rue-Albrecht (14:56:26) (in thread): > Oxford Single Cell Symposium 2018 > will be held on Monday, 23 April 2018 at the Saïd Business School, Oxford > Speakers so far confirmed are: > - Wolf Reik, Babraham Institute > - Ido Amit, Weizmann Institute of Science

Kevin Rue-Albrecht (14:57:49) (in thread): > https://docs.google.com/forms/d/e/1FAIpQLSfKCPQHtTGGWI0593Ou27KjiJ6TXAnF0_67M6c36-jFAiA0-Q/viewform

Aaron Lun (15:09:42) (in thread): > Ugh… will to live –> 0.

Aaron Lun (15:11:24) (in thread): > I can’t remember a time when I was not reviewing this paper.

Aaron Lun (15:11:45) (in thread): > I bet everyone is having dinner, right?

Aaron Lun (15:11:47) (in thread): > Screw you guys.

Federico Marini (15:12:09): > :D:D

Federico Marini (15:12:34) (in thread): > i probably will not be able to attend

Federico Marini (15:12:50): > I was aiming at ERUM (may)

Federico Marini (15:13:11): > plus some more german-based conferences

Federico Marini (15:13:27): > where I wanted to propose a tutorial session on rnaseq

Charlotte Soneson (15:14:49) (in thread): > me neither I think

Aaron Lun (15:17:46): > knock yourself out.

Kevin Rue-Albrecht (15:20:12): > ERUM: “Barbara Borges Ribeiro is a software engineer at RStudio working primarily in the Shiny package.”

Aaron Lun (15:20:21): > Sweet

Aaron Lun (15:20:34): > dunno what we can ask for though.

Aaron Lun (15:20:48): > Oh, the ability to set brushes in advance.

Federico Marini (15:20:49): > named dropdown!!!!

Federico Marini (15:21:41): > https://github.com/rstudio/shinydashboard/issues/208 - Attachment (GitHub): Make dropdownMenu a Shiny input if an id is provided · Issue #208 · rstudio/shinydashboard > In an ideal world, here’s everything I’d like to implement: # ————————————————————- # # ————————– MOCK UP ————————– # # —…

Aaron Lun (15:23:17): > Oh yeah…

Kevin Rue-Albrecht (15:25:05): > Gábor Csárdi has been writing R tools for more than 10 years, and is the co-author of theigraphR package

Federico Marini (15:25:58): > BETTER DEFAULTS for the plotting func?:smile:

Kevin Rue-Albrecht (15:26:28): > anything about the d3.js thing that allows users to grab and shake the graph? ^^

Federico Marini (15:26:33): > i think he put the development of igraph pretty much on ice

Kevin Rue-Albrecht (15:26:57): > https://bl.ocks.org/mbostock/3750558 - Attachment (bl.ocks.org): Sticky Force Layout > Mike Bostock’s Block 3750558

Federico Marini (15:26:57): > as a perfect metaphor to data torturing

Kevin Rue-Albrecht (15:27:43): > sweet, when you double click, they return ‘to place’

Federico Marini (15:29:03): > there are some html widgets for that

Federico Marini (15:29:26): > I wanted to not add another dependency..

Kevin Rue-Albrecht (15:30:04): > good call. let’s keep it simple unless there’s some demand or we have extra time on our hands

Aaron Lun (15:42:16): > Review down.

Aaron Lun (15:42:19): > Going home.

Kevin Rue-Albrecht (16:41:58): > just thinking we could probably scratch some runtime memory by storing only X and Y coordinates inpObjects$coordinateshttps://github.com/csoneson/iSEE/blob/master/R/iSEE.R#L729pObjects$coordinates[[plot_name]] <- p.out$xyI thinkp.out$xycontains all the plot data (including color, etc) > We shouldn’t have an issue stripping it down to XY, would we? - Attachment (GitHub): csoneson/iSEE > iSEE - R/shiny interface for interactive visualization of data in objects derived from the SummarizedExperiment class

2018-02-04

Aaron Lun (06:46:09): > That is true, but it’s probably not that much.

Kevin Rue-Albrecht (06:46:43): > No worries. I’ve done it already on my local branch, but let me know and I can revert it back

Kevin Rue-Albrecht (06:47:25): > btw, coverage is going up nicely, i’m just about to cross the 30% mark

Aaron Lun (06:47:57): > Looking at your tests; are you checking for sane$xy$Xand$xy$Y?

Kevin Rue-Albrecht (06:48:03): > you can see the current status here:https://codecov.io/gh/csoneson/iSEE/tree/58369f2ee08e61b894048bc71eccd7b4ae9e7c62/R - Attachment (Codecov): Code coverage done right. > Hosted coverage report highly integrated with GitHub, Bitbucket and GitLab. Awesome pull request comments to enhance your QA.

Aaron Lun (06:48:05): > e.g., that they’re numeric or factors.

Kevin Rue-Albrecht (06:48:08): > not yet

Kevin Rue-Albrecht (06:48:20): > it’s easy enough to add extra tests

Aaron Lun (06:48:29): > Nice thing about returning the Colourby and the brushbY is that you can easily check them as well.

Kevin Rue-Albrecht (06:48:44): > and they’re lightning fast (the tests), considering that there’s not much evaluated

Kevin Rue-Albrecht (06:49:23): > so, all the more reasons to add as many checks as you like in there

Kevin Rue-Albrecht (06:50:00): > i’m aware we’ll have to do some refactoring in thehelperandsetupscripts for clarity

Kevin Rue-Albrecht (06:51:20): > i’m trying to roughly split things logically, but I already had to fiddle with thesetupscript names to make suresetup_scegets run beforesetup_plotting(alphabetical issue)

Aaron Lun (06:51:43): > Y’know, perhaps there’s no need to be too fancy with this.

Kevin Rue-Albrecht (06:51:53): > ay ay capt’n

Aaron Lun (06:51:58): > Even if we copy-pasted, it would be <10 lines.

Aaron Lun (06:52:05): > at the start of every script… probably fine.

Aaron Lun (06:52:16): > I do more copy-pasting for my manuscripts.

Kevin Rue-Albrecht (06:52:56): > there we go, just crossed the 30%https://codecov.io/gh/csoneson/iSEE/tree/kevin_tests/R - Attachment (Codecov): Code coverage done right. > Hosted coverage report highly integrated with GitHub, Bitbucket and GitLab. Awesome pull request comments to enhance your QA.

Kevin Rue-Albrecht (06:59:00): > what’s your plan t’day, wanna add some of your own tests? I’m still juggling with that markdown website that i’m updating/recompiling for a project

Aaron Lun (07:04:36): > Got to deal with scater today. Again.

Kevin Rue-Albrecht (07:04:47): > lol

Aaron Lun (07:04:48): > Actually adding some proper tests for scater for a change.

Kevin Rue-Albrecht (07:05:32): > I’m actually just facing a frustrating thing with scater right now: the tSNE plot moved around despite using the same seed

Kevin Rue-Albrecht (07:05:56): > i’m just checking whether input genes may be ordered differently or something silly

Kevin Rue-Albrecht (07:06:31): > you know how wetlab collaborators are when they points move around from one pipeline run to the other

Aaron Lun (07:07:11): > … sometimes Rtsne updates, and there’s nothing we can do.

Kevin Rue-Albrecht (07:07:29): > yup could well be haven’t checked that side of the story yet

Kevin Rue-Albrecht (07:07:45): > i’m on scater 1.7.4 btw

Aaron Lun (07:07:55): > that, at least, shouldn’t have changed.

Kevin Rue-Albrecht (07:08:50): > I would have been surprised indeed. Seems like the input is identical anyway, row and column order

Aaron Lun (10:17:06): > Hazzah! Scater plot tests are partially complete.

Aaron Lun (10:21:16): > Looking at your plot tests - checking for matching commands might be a path to suffering.

Aaron Lun (10:21:44): > Especially if we decide to e.g., switch from[, "BLAH"]to[["BLAH"]], or other minor things that would change the matched string but not change the outcome.

Kevin Rue-Albrecht (10:22:00): > i’m still a bit inconsistent in my tests, tbh

Kevin Rue-Albrecht (10:22:41): > but I’m mainly checking only for a partial match, e.g. making sure that the covariate selected for ColorBy is indeed present incmd$color

Aaron Lun (10:22:52): > It seems safer to check forexpect_identicalinp.out$xy.

Kevin Rue-Albrecht (10:23:07): > there are so many things that can be tested ^^

Aaron Lun (10:23:08): > which would give the same thing, but allow us to not worry about the specific commands

Aaron Lun (10:23:27): > Especially if we have to reorder some of the commands.

Kevin Rue-Albrecht (10:23:34): > expect_identical? hmm I think i see what you mean

Aaron Lun (10:23:40): > or split them up in ways other thandata,brush,lim, etc.

Kevin Rue-Albrecht (10:23:50): > yeah, I’m not a big fan of myexpect_namedeither

Kevin Rue-Albrecht (10:26:06): > at least I’m putting in place the tests to cover the package, we can refine the actual expectations in rounds of refactors

Kevin Rue-Albrecht (10:26:33): > but these are all valid point, obviously

Aaron Lun (10:27:12): > Sure. I just thought I’d spare you from writing all those backslashes.

Kevin Rue-Albrecht (10:28:13): > omg.. those backslashes killed me:testthatthrew up a bunch of errors when I initially didn’t write them

Aaron Lun (10:28:36): > you probably need to setfixed=TRUEto avoid regexes.

Kevin Rue-Albrecht (10:29:27): > expect_match(... fixed = FALSE, ..., ...):sob:

Aaron Lun (10:31:13): > Anyway, the reason I suggest end-point testing ofxyis that the handling of nested dataframes will probably alter the commands rather dramatically.

Kevin Rue-Albrecht (10:33:06): > True. Still, even though commands may change format in the future, probably wouldn’t hurt to check that they always match/contain a certain pattern/information/structure.

Kevin Rue-Albrecht (10:33:48): > even if that means changing the unit tests whenever we dramatically change the behaviour of the package

Aaron Lun (10:34:00): > Well, it’s your call.

Kevin Rue-Albrecht (10:34:44): > i’ll leave it for now, as long as it works and doesn’t cause too much pain

Kevin Rue-Albrecht (10:35:56): > we can always ‘deprecate’ the tests by commenting them out temporarily, and deleting them altogether if we can’t restore them in a reasonable amount of time

Aaron Lun (10:36:10): > Okay. ¯*(ツ)*/¯

Kevin Rue-Albrecht (10:36:12): > (say a week, to draw a line)

Kevin Rue-Albrecht (10:37:48): > … do you have an example of nested dataframe in mind? i’m still trying to picture one

Aaron Lun (10:38:15): > see the latestcalculateQCMetricswithcompact=TRUE

Aaron Lun (10:38:30): > This stops the function from vomiting out everything intocolDataandrowData.

Aaron Lun (10:38:45): > My recent updates toscaterallow the plotting functions to handle nested metadata.

Kevin Rue-Albrecht (10:39:07): > riiight, I saw the man page ofcalculateQCMetricsearlier today

2018-02-05

Kevin Rue-Albrecht (03:35:48): > Hi all. I left the unit tests last with a mystery unsolved. The last two tests (commented out) raise weird errors about functions and objects not found, that don’t really make sense

Kevin Rue-Albrecht (03:36:58): > Meanwhile, I think some refactoring of the setup and helper scripts is needed/may even help the above

Kevin Rue-Albrecht (03:37:49): > It’s week days again so I’ll be slower. If anyone wants to look at the kevin_tests branch, I probably won’t touch it today

Kevin Rue-Albrecht (03:39:27): > The problematic tests might also be due to a bunch of packages I updated yesterday, although I suspect it’s rather me doing something stupid

Kevin Rue-Albrecht (05:13:13): > FYI:https://www.rstudio.com/resources/cheatsheets/- ggplot:https://github.com/rstudio/cheatsheets/raw/master/data-visualization-2.1.pdf- Shiny:https://github.com/rstudio/cheatsheets/raw/master/shiny.pdf- package dev (including unit tests):https://github.com/rstudio/cheatsheets/raw/master/package-development.pdf- R markdown(1):https://github.com/rstudio/cheatsheets/raw/master/rmarkdown-2.0.pdf- R markdown(2):https://www.rstudio.com/wp-content/uploads/2015/03/rmarkdown-reference.pdf - Attachment (RStudio): Cheatsheets > RStudio Cheat Sheets The cheat sheets below make it easy to learn about and use some of our favorite packages. From time to time, we will add new cheat sheets to the gallery. If you’d like us to drop you an email when we do, let us

Aaron Lun (07:43:39): > Still fighting through scater.

Aaron Lun (07:55:08): > God

Aaron Lun (07:55:12): > It hurts so much

Kevin Rue-Albrecht (07:57:29): > The ungrateful job of refactoring… it’ll pay off though. Courage

Kevin Rue-Albrecht (08:00:10): > Btw, if no one gets to it first, I’ll reduce the setup and helper scripts of unit tests to one of each, including only minimal bits and pieces that can then be called and assembled into test objects local to the individual test scripts.

Kevin Rue-Albrecht (08:01:02): > I think I’ve initialised too many test objects in those setup/helper scripts

Kevin Rue-Albrecht (08:01:26): > Because then I’m editing them (I think locally) within individual tests.

Kevin Rue-Albrecht (08:02:11): > But that is confusing even for me, and if I’m wrong, it may actually cause some weird interactions between tests

Aaron Lun (08:02:46): > I still think you’ve overengineered it.

Kevin Rue-Albrecht (08:02:54): > The only thing I’d like to avoid is to ‘data(allen)’ at the start of every test script

Aaron Lun (08:02:57): > A small amount of C&P is fine.

Kevin Rue-Albrecht (08:03:09): > It would cost a few seconds each time

Aaron Lun (08:03:11): > meh

Kevin Rue-Albrecht (08:03:29): > C&P?

Kevin Rue-Albrecht (08:03:57): > Create and preprocess?

Aaron Lun (08:12:24): > Copy and pasting

Aaron Lun (08:12:50): > I mean, you can constructdata(allen)insetup,

Aaron Lun (08:13:05): > and also do the TSNE and stuff there;

Aaron Lun (08:13:12): > and just make a copy in each test script.

Aaron Lun (08:13:23): > This should protect against any interactions when the sce gets modified.

Kevin Rue-Albrecht (08:16:17): > Yup. I’ll look at it this tonight then

Aaron Lun (08:20:39): > I mean, true chaos is something like the old SCESet, when Davis (for reasons unbeknownst to me) turned off the locked environment; this meant that you could copy the object, modify the copy, and the original would also be modified.

Charlotte Soneson (10:22:41) (in thread): > Is it as simple as changingexpect_that(totest_that(? Or is there a reason you are usingexpect_that(? That’s the function that’s looking for theconditionargument.

Charlotte Soneson (10:39:43) (in thread): > And should theextra_cmdintest_that(".coerce_to_numeric handles gene text input", {belab_out?

Charlotte Soneson (10:45:21) (in thread): > with those changes, the tests seem to run for me:slightly_smiling_face:

Kevin Rue-Albrecht (10:52:24) (in thread): > oh no ..goes to hang himself

Kevin Rue-Albrecht (10:53:07) (in thread): > damn, I always pause a second to decide which ofexpect_thatortest_thatI need to type

Kevin Rue-Albrecht (10:53:52) (in thread): > it’s like reading version 472 of a manuscript: I couldn’t spot the typos anymore

Kevin Rue-Albrecht (10:55:04) (in thread): > I trackedextra_cmdto the code of the function that I was testing, but it doesn’t matter anymore: it theexpect_that/test_thatconfusion that’s causing all these particular problems

Kevin Rue-Albrecht (10:55:13) (in thread): > thanks

Charlotte Soneson (10:57:35) (in thread): > :+1:Better when things are easy to solve than when it’s some super complicated thing:slightly_smiling_face:

Kevin Rue-Albrecht (10:58:27) (in thread): > Definitely

Kevin Rue-Albrecht (10:59:17) (in thread): > Will be even easier when I refactor/simplify the setup for the unit tests

Aaron Lun (12:22:31): > My scater refactoring is done for the week!

Aaron Lun (12:36:34): > Still need to tacklefindImportantPCsandplotExplanatoryVariables.

Aaron Lun (12:36:56): > Now, onto this thing.

Kevin Rue-Albrecht (12:37:00): > i have fond memories of the latter ^^

Kevin Rue-Albrecht (12:37:46): > speaking of Davis, what’s the status about his Docker PR ?

Aaron Lun (12:37:52): > Dunno.

Kevin Rue-Albrecht (12:37:57): > I’m no expert at all in that regard

Aaron Lun (12:38:11): > I say we ignore it until we’re told to merge it.

Kevin Rue-Albrecht (12:38:50): > current strategy it is then:innocent:

Aaron Lun (12:41:22): > What’s the deal with those two tests at the end of plotting?

Aaron Lun (12:41:33): > what error are you getting?

Kevin Rue-Albrecht (12:41:37): > Charlotte figure it in a thread

Kevin Rue-Albrecht (12:41:53): > it was just a stupid error out of tiredness

Kevin Rue-Albrecht (12:42:03): > I confusedexpect_that/test_that

Kevin Rue-Albrecht (12:43:41): > The former is actually a deprecated function that I’ve never used (except for this ‘brain-fart’). I’d have preferred that they remove it altogether. Autocompletion is a poisoned gift.

Aaron Lun (14:15:55): > Added tests for brushing links.

Aaron Lun (14:16:18): > This involved a few corner-case bug fixes.

Aaron Lun (14:16:23): > Will deal with the tables tomorrow.

Aaron Lun (14:23:50): > ggplot team, that dual colour bar problem is back again.

Aaron Lun (14:25:37): > brushing for horizontal violin plots is also fucked up

Aaron Lun (14:29:04): > Oh wait, was on an ancient branch

Aaron Lun (14:29:15): > kevin_fixesrather thankevin_tests

Aaron Lun (14:29:18): > Oh thank god

Aaron Lun (14:29:24): > thought someone had reverted all of the bugfixes.

Aaron Lun (14:30:37): > had a little heart palpitation there.

Kevin Rue-Albrecht (14:47:52): > Three words: git fetch —prune:joy:

Aaron Lun (14:48:03): > Yeah, I did that.

Aaron Lun (14:48:21): > Didn’t quite clean it out.

Kevin Rue-Albrecht (14:49:23): > Cool for the brush tests. I was going to ask you if you could take care of those

Federico Marini (16:08:06) (in thread): > i think it is done. at least, a docker image is built and available at quay

Kevin Rue-Albrecht (16:09:47) (in thread): > I’ve never used docker images yet, but that sounds like good news. Does it mean we should merge the PR?

Federico Marini (16:10:26) (in thread): > the only thing is whether there are going to be probs with the bioc submission for having this “exotic” files

Federico Marini (16:10:36) (in thread): > probably not

Federico Marini (16:10:48) (in thread): > but AFAIK it is not a common practice

Kevin Rue-Albrecht (16:11:10) (in thread): > well, let’s just runcheckandBiocCheckand if they don’t complain, I think we’re good

Federico Marini (16:11:24) (in thread): > i don’t know how complicated it would be to otherwise maintain the extra branch

Kevin Rue-Albrecht (16:11:34) (in thread): > worse case, the Bioc reviewer will tell us to remove it, and i’m good with that too

Kevin Rue-Albrecht (16:13:19) (in thread): > ah right. well I think an extra branch would not pose any problem considering that the docker-related files are separate from the rest of the package

Kevin Rue-Albrecht (16:14:12) (in thread): > it’s just a matter of rebasing the branch every now and then, and maybe updating the list of dependencies in theinstall.Rfile:https://github.com/csoneson/iSEE/pull/90/files#diff-758da3847ee09133b4dd3197e5a60716 - Attachment (GitHub): Dockerfile by davismcc · Pull Request #90 · csoneson/iSEE > Adding Dockerfile and install.R script to build the package into a functioning docker image.

Federico Marini (16:14:49) (in thread): > that was my idea spoken out loud in detail, yep

Federico Marini (16:14:51) (in thread): > :slightly_smiling_face:

Federico Marini (16:15:27) (in thread): > thanks for the verbosity - I still am trying to recover from the nursing week where the kids all got the virus

Kevin Rue-Albrecht (16:15:35) (in thread): > once again, if it turns out to be more work than worth the effort, we can always drop it later

Federico Marini (16:15:53) (in thread): > agreed

Kevin Rue-Albrecht (16:15:58) (in thread): > verbosity? you mean on the channel?

Federico Marini (16:16:18) (in thread): > nono.. just here for detailing clearly the idea

Federico Marini (16:16:44) (in thread): > I was on--verbose=not_even_runtime

Federico Marini (16:16:46) (in thread): > :stuck_out_tongue:

Kevin Rue-Albrecht (16:17:19) (in thread): > ahh

Kevin Rue-Albrecht (16:17:43) (in thread): > i though like the other day, when the channel was sadly quiet:sweat_smile:

Kevin Rue-Albrecht (16:18:17) (in thread): > i’ve got an odd feeling that we more than partly contributed to hitting the 10k messages so rapidly hehehe

Kevin Rue-Albrecht (16:23:48): > it just hit me on my way home: i don’t think thehelperandsetupscript are meantat allfor setting up test objects or even their components, but rather to define (sub-)functions specifically for the testing, e.g. a function that would compare too objects in a specific way not equivalent to any of theexpect_equal,expect_identical, … functions

Kevin Rue-Albrecht (18:03:28): > Alright. Everything cleaned up except fortest_plotting.R

Kevin Rue-Albrecht (18:03:46): > I’m keeping that one for tomorrow. Don’t wanna spoil all the fun tonight

Kevin Rue-Albrecht (18:06:25): > I think we’re not doing too bad on progress

2018-02-06

Kevin Rue-Albrecht (04:41:27) (in thread): > <!channel>Just thinking about last time we mentioned scheduling a Skype update. I found that Aaron wrote: > “I think we need a feature freeze and testing of everything we have now. But if you are going to add new features, I would suggest thinking about heatmaps.” > In any case, I would offer the idea of having one after I’m done refactoringtest_plotting.R, so that we can discuss the current test layout, and one we are all on the same page, distribute the remaining ~65% of code coverage amongst ourselves. Opinions?

Kevin Rue-Albrecht (04:42:28): > Apparently we can’t tag the channel in a thread. Makes sense:sweat_smile: - Attachment: Attachment > <!channel> > Just thinking about last time we mentioned scheduling a Skype update. I found that Aaron wrote: > “I think we need a feature freeze and testing of everything we have now. But if you are going to add new features, I would suggest thinking about heatmaps.” > In any case, I would offer the idea of having one after I’m done refactoring test_plotting.R, so that we can discuss the current test layout, and one we are all on the same page, distribute the remaining ~65% of code coverage amongst ourselves. Opinions?

Kevin Rue-Albrecht (04:53:46): > btw: I’ll be done refactoringtest_plotting.Rtonight, for sure, I’ve done half the job already this morning, but need to get on with other things for the rest of the day

Charlotte Soneson (04:54:50): > Another Skype sounds good. I started thinking about the heatmaps, sounded like some of you also had some ideas or potential issues so perhaps would be good to discuss that as well.

Kevin Rue-Albrecht (04:57:29): > I’m keen to discuss heat maps too. I’ve kinda closed myself in the habit of using theComplexHeatmappackage for manuscript figures, but I’m very curious aboutgeom_rasterthat sounds exactly what we’re looking for, to stick with theggplot2framework

Kevin Rue-Albrecht (04:57:59): > curious to hear about your individual experience/favorite ones

Aaron Lun (06:08:15) (in thread): > It would still be good to have SCE object creation in setup, otherwise it would really take too long. However, everything else should go inside the individual files, to keep them reasonably self-contained.

Aaron Lun (06:11:09) (in thread): > … which I see you’ve done.

Kevin Rue-Albrecht (06:11:37) (in thread): > I’m learning.. slowly but (kinda) surely

Federico Marini (07:24:02): > historical fan of pheatmap

Federico Marini (07:24:44): > since ComplexHeatmap was not out yet once I started doing heatmaps with extras such as annotation columns, “block” separation, etc

Federico Marini (07:25:16): > and yes, I could be in for another skype round

Kevin Rue-Albrecht (09:33:07): > nice job on the table links Aaron

Aaron Lun (09:58:04): > stuck in a refactoring fight with the tables, re. sanity of memory.

Aaron Lun (09:58:12): > Probably the same question applies with the brushes as well.

Aaron Lun (09:58:17): > Need to ponder this…

Kevin Rue-Albrecht (09:58:59): > Ok. I was hoping to leave you unit testing the brush parameters inplotting.Ranyway.

Aaron Lun (09:59:31): > Well, probably not too hard.

Aaron Lun (09:59:40): > Just check the commands get churned out

Kevin Rue-Albrecht (09:59:42): > similar to zoom, i had the feeling

Aaron Lun (09:59:43): > and the brushby is correct.

Kevin Rue-Albrecht (10:00:41): > In any case, first commit tonight will be the refactoring of existing tests. Then I’ll have a look at writing new tests.

Aaron Lun (10:00:57): > Okay

Aaron Lun (10:40:11): > UAUGHAUGA

Federico Marini (10:41:28): > almost an RNA sequence, phew

Kevin Rue-Albrecht (11:15:10): > Was that a termination codon? Over.

Aaron Lun (11:19:27): > Just tried a cycle of refactoring, and ended up right back at the start.

Kevin Rue-Albrecht (11:19:47): > ahh a circular plasmid then@Federico Marini

Federico Marini (11:21:58): > Aspartic acid, Alanine, Methionine, Asparagine!

Kevin Rue-Albrecht (11:23:18): > leucine-alanine-tryptophane-leucine

Federico Marini (11:44:51): > hey<!channel>

Aaron Lun (11:44:56): > Yo

Kevin Rue-Albrecht (11:45:00): > hey coco

Federico Marini (11:45:06): > after some nerve-damaging pkg collisions

Federico Marini (11:45:08): > http://shiny.imbei.uni-mainz.de:3838/iSEE/

Federico Marini (11:45:17): > it should be uppandrrrrunning

Aaron Lun (11:45:21): > fuck yeah

Kevin Rue-Albrecht (11:45:38): > :tada::tada::tada::tada::tada:

Federico Marini (11:46:07): > http only as of now

Kevin Rue-Albrecht (11:46:07): > port 3838 ?!?!?!?! what have you dooooone!:stuck_out_tongue:

Kevin Rue-Albrecht (11:46:11): > where is 42?

Federico Marini (11:46:16): > very brutalo brutalo

Federico Marini (11:46:30): > i had some other apps running:smile:

Federico Marini (11:46:33): > anyway

Federico Marini (11:46:41): > it is a snapshot of now

Kevin Rue-Albrecht (11:46:57): > it’s perfect. just what we need for demos at least

Federico Marini (11:47:05): > good thing, it is publicly facing DA INTERNETTAH

Federico Marini (11:47:10): > exactly

Federico Marini (11:47:27): > feel free to blame me if it works on your pc locally but not on this server:stuck_out_tongue:

Federico Marini (11:48:25): > I still did not manage to follow up on@Aaron Lun’s links for the 10x sets

Federico Marini (11:48:31): > otherwise we could demo also these

Federico Marini (11:49:11): > I will give another presentation on Fr, and it is going to be in front of neurobiologists

Federico Marini (11:49:32): > therefore I wanted to have them peek into iSEE + 10x subset

Federico Marini (11:58:50): > btw, feel free to give away the link - just keep in mind it is not so the monster machine one would hope for

Aaron Lun (11:59:35): > Okay, was going to do so.

Kevin Rue-Albrecht (11:59:49): > it’s already lagging:stuck_out_tongue:

Kevin Rue-Albrecht (12:00:49): > nah once booted up it’s fine

Federico Marini (12:01:00): > the boot phase is long-y

Federico Marini (12:01:08): > but should not be the main issue

Federico Marini (12:01:20): > i ensure some timeout when loading so the server does not crash

Kevin Rue-Albrecht (12:49:31): > Which one of us takes charge of the iOS iSEE app?

Kevin Rue-Albrecht (12:51:54): > Hm.. I just can’t figure out if brushing is possible on the phone.

Kevin Rue-Albrecht (13:30:16): > arf.. just got home and noticed that the screenshot didn’t get through

Kevin Rue-Albrecht (13:31:11): > @Kevin Rue-Albrechtshared a file:Lol - File (PNG): Lol

Federico Marini (13:36:46): > you need the new feature, the 4 finger iphone tapping:smile:

Kevin Rue-Albrecht (19:09:03): > alright, I’ll settle at 97.45% coverage tonight, forplotting.R

Kevin Rue-Albrecht (19:11:46): > not sure how to handle.find_linked_geneAaron, if you can take care of this one, and maybe another couple of lines in there, that I’m not sure to trigger.

Kevin Rue-Albrecht (19:12:42): > we should be ready for a merge tomorrow, i’d say, so that we can start distributing the remainder of the code to cover between us

2018-02-07

Kevin Rue-Albrecht (03:26:59): > i gotta say, experimenting with the testing code manually can get pretty fun, when you get to writing zooms and brushes programmatically

Kevin Rue-Albrecht (03:27:55): > i’ve got a clearer idea of how to write ‘modes’, i.e., to initialise the app with certain brushing connections already in place

Aaron Lun (07:18:04): > Yep, that’s why they’re there.

Aaron Lun (10:51:50): > Done.

Aaron Lun (10:52:00): > Merge when ready.

Kevin Rue-Albrecht (10:56:39): > ok cool !

Aaron Lun (13:15:22): > urgh got the beachmat reviews back. Well, that’s next week gone.

Federico Marini (13:16:27): > where did you submit aaron if i can ask?

Aaron Lun (13:18:48): > PloS comp bio

Federico Marini (13:21:33): > ok so in full article format i guess

Aaron Lun (13:24:15): > Yeah

Aaron Lun (13:25:03): > So… I won’t be doing anything on iSEE next week.

Aaron Lun (13:25:15): > The reviews were mostly reasonable, but work sucks no matter what it is.

Federico Marini (13:25:27): > I think we are already at a good point

Federico Marini (13:25:57): > IMHO we are submission-mature in terms of features (if we don’t want to slip in the heatmap functionality)

Federico Marini (13:26:17): > so it is a matter of small, fine edits

Federico Marini (13:28:03): > anyway. good luck with the beachmat plan then

Federico Marini (13:28:06): > heading home:wink:

Kevin Rue-Albrecht (13:49:12): > I like the 14 star-gazers we (already) have on GitHub, btw

Kevin Rue-Albrecht (13:54:35): > Alright. Merging the unit test branch now. At least it give us all a template/base from which to branch again and add different sets of tests.

Kevin Rue-Albrecht (13:55:02): > Plus it will make themasterbranch look better in terms of code coverage:innocent:

2018-02-08

Aaron Lun (05:10:22): > I’ll try to get some of the remaining tests done today.

Kevin Rue-Albrecht (07:04:30): > Awesome, thanks

Kevin Rue-Albrecht (07:04:42): > Anyone up for a Skype tomorrow afternoon?

Kevin Rue-Albrecht (07:05:04): > Pat ourselves on the back before heading to the pub? ^^

Aaron Lun (07:32:53): > Yes, I can do that.

Charlotte Soneson (07:53:27): > After ~3pm tomorrow (Swiss time) is fine with me

Federico Marini (08:31:58): > I’ll be attending a workshop the whole day

Federico Marini (08:34:15): > but say after 15.30 (swiss-german) it should be done

Federico Marini (08:34:20): > so I would be in

Kevin Rue-Albrecht (08:53:13): > After 3pm UK time should be fine for me.

Charlotte Soneson (08:53:57): > So shall we say 3pm UK/4pm continental time as usual then?

Kevin Rue-Albrecht (08:56:53): > Yep, let’s aim for that. We’ll adjust if anything comes up.

Aaron Lun (08:58:05): > sounds good to me.

Federico Marini (09:07:29): > ’kie:wink:

Charlotte Soneson (11:25:53): > Sorry, is it possible to postpone the call half an hour or so tomorrow? Turns out I should meet with some PhD applicants at 4…

Kevin Rue-Albrecht (11:29:09): > Should work for me. Otherwise, I don’t want to pressure anyone, we can postpone it for next week. Not sure where we want to draw boundaries, but I’m not opposed to weekends either if it helps avoid collision with work time.

Aaron Lun (12:23:25): > Don’t know what boundaries are.

Kevin Rue-Albrecht (12:24:00): > remove your hand of my shoulder first:sweat_smile:

Charlotte Soneson (12:38:14): > Most of this weekend is fine with me too if that works better for you.

Aaron Lun (12:38:28): > I only sleep with students.

Aaron Lun (12:38:40): > Okay, that sounded weird.

Aaron Lun (12:38:52): > As in, we had to share a room.

Kevin Rue-Albrecht (12:39:16): > don’t worry Aaron, in 10k messages, it will all be buried in Slack logs:innocent:

Federico Marini (13:13:08): > I am little more bound on the weekend

Federico Marini (13:13:30): > but once the wild ones are in bed, I can be operative:slightly_smiling_face:

Federico Marini (13:13:52): > or in any case, tomorrow 16.30 would also be ok

Charlotte Soneson (14:02:45): > Thanks, so it seems everyone is fine with 15:30 UK/16:30 CH-DE tomorrow, so let’s aim for that then.

Aaron Lun (14:14:52): > Waiting for something to run, so will refactor someiSEEcode in preparation for adding heatmaps.

Aaron Lun (14:20:46): > This is going to be a bit brutal…

Aaron Lun (15:57:28): > Imminent commit has a number of changes.

Aaron Lun (15:58:18): > 1. Themodehas been reconfigured toredDimPlot, rather than justredDim(and so on for all the others). This avoids the need to decide whether to stickTableorPlot(orHeatmap) onto the end of the mode name.

Aaron Lun (15:59:06): > 2.geneExprPlot(for Gene expression plots) has been changed tofeatExprPlotfor feature expression plots. This should be more general as you can stick anything in aSummarizedExperimentobject.

Aaron Lun (15:59:45): > 3.geneStatTablehas been changed torowStatTable, again for generality forSummarizedExperimentinput.

Aaron Lun (16:00:29): > 4. Shiny input fields were previously (but not always) named likeredDimColorBy1. Now they are consistently named asredDimPlot1_ColorBy, which should reduce confusion when setting/getting fields.

Aaron Lun (16:02:40): > I should probably also change the colouring options to “Row table” and “Feature name”… but I’m hungry.

Aaron Lun (16:03:32): > Let me know if there are any bugs.

Kevin Rue-Albrecht (16:14:07): > All good points. (2) crossed my mind when we talked about FACS but I kept forgetting to bring it up. Nice work!

Aaron Lun (16:21:10): > There’s probably a number of bugs that have slipped through; have a play around and check that things work.

Aaron Lun (16:21:17): > It’s on theaaron_testsbranch.

Kevin Rue-Albrecht (16:50:35): > will do. just gotta write a few supp table legends for a manuscript first

Kevin Rue-Albrecht (17:27:18): > doesn’t look broken in any way that I can see

2018-02-09

Aaron Lun (04:23:07): > Impending push will also change the names of the colouring options, to “Row table” and “Feature name”.

Aaron Lun (04:23:52): > The greatest potential for bugs will be when I’ve forgotten to put_in the Shiny input name.

Federico Marini (05:31:21): > quick update from the workshop

Federico Marini (05:31:31): > they really want people to focus on the talks

Federico Marini (05:31:39): > i.e., they do not have wifi

Federico Marini (05:32:05): > but i expect to be able to flee and make it on time for our scheduled skype meetup

Federico Marini (05:38:24): > (also expect maybe a couple of stars & watchers on the repo which they photographed during the talk:slightly_smiling_face:)

Federico Marini (05:39:15): > I did not photobomb their pics:wink:

Aaron Lun (05:39:28): > lol

Federico Marini (05:41:29): > I admit I was tempted

Federico Marini (05:41:45): > lots of people in suits here

Federico Marini (05:41:53): > need to put back some balance

Kevin Rue-Albrecht (06:13:36): > what balance?

Aaron Lun (06:14:41): > in the force

Kevin Rue-Albrecht (10:17:47): > I just realised it’s in 10 min right? 15:30 uk time

Kevin Rue-Albrecht (10:18:51): > It’s all good too, but I was about to miss it by an hour hehehe

Aaron Lun (10:21:00): > yep

Charlotte Soneson (10:29:29): > I’m running a bit late with the interviews, please start without me. I’m joining soon, sorry:grimacing:

Aaron Lun (10:29:38): > skype is being a bitch for me

Aaron Lun (10:29:47): > why does it need my email

Aaron Lun (10:29:49): > ???

Aaron Lun (10:30:48): > and my DOB?

Kevin Rue-Albrecht (10:31:03): > your Skype doens’t have boundaries either:stuck_out_tongue:

Aaron Lun (10:31:18): > well anyway, I’m in.

Aaron Lun (14:24:42): > Holy shit this shit is insane.

Aaron Lun (14:24:49): > Uploading once it clears check.

Aaron Lun (14:24:52): > it will BLOW your mind.

Kevin Rue-Albrecht (14:26:24): > i look forward to it:slightly_smiling_face:

Aaron Lun (15:00:48): > Waiting for CI. But this is best enjoyed with: > > library(iSEE) > example(iSEE, ask=FALSE) # just Ctrl'C out > > rowData(sce)$ave_count <- rowMeans(counts(sce)) > rowData(sce)$n_cells <- rowSums(counts(sce) > 0) > rowData(sce)$rand_letters <- sample(LETTERS[1:5], nrow(sce), replace=TRUE) > iSEE(sce) >

Aaron Lun (15:05:00): > @Federico Marinineed to update the code tracker for the new colours (also take this opportunity to centralize the colour specification; for example, there are some colours indynamicUI.Rto specify the shinydashboard box colours).

Federico Marini (15:34:00): > ok will do:wink:

Federico Marini (15:44:51): > I can’t see the rowData plot - is it supposed to be there already or did I mishear that in the skype conv`?

Charlotte Soneson (15:46:23): > It’s visible to me

Charlotte Soneson (15:47:42): > Looks nice:slightly_smiling_face:

Federico Marini (15:49:42): > danmn

Federico Marini (15:49:48): > i pulled

Federico Marini (15:49:51): > but did not install

Federico Marini (15:49:55): > JEEZ

Charlotte Soneson (15:50:21): > It’s late Friday evening, that’s understandable

Federico Marini (15:50:51): > thanks for the comprehension:slightly_smiling_face:

Federico Marini (15:56:50): > got it too

Federico Marini (15:56:53): > neat work:slightly_smiling_face:

Kevin Rue-Albrecht (16:28:02): > neat work += 1

Federico Marini (16:44:44): > somewhat there are two genetables for each one which really exists - in the panels graph?

Federico Marini (16:46:46): > I’ll check

Federico Marini (16:53:15): > ok, got it. after aaron’S changes, they all get inserted already in the graph, so I dont needhttps://github.com/csoneson/iSEE/blob/a5a82b06623fedf7192668e82d07ee812d76d60f/R/codetrack.R#L129 - Attachment (GitHub): csoneson/iSEE > iSEE - R/shiny interface for interactive visualization of data in objects derived from the SummarizedExperiment class

Aaron Lun (17:09:42): > If someone can give smarter x/y-axis labels to the reduced dimension plot, we can close one of the issues.

Aaron Lun (17:11:41): > And thinking further about it - I suspect that a record of the “incoming” brush would be better served as a UI element hyperlinked to the location of the transmitting plot, which should make it easy to navigate around the interface. I am also open to having similar links to all the child plots; this information can be extracted relatively easily frombrush_links.

Kevin Rue-Albrecht (18:32:00) (in thread): > @Aaron Luni’m about to commit the update, but I can’t find an issue that mentions it

Kevin Rue-Albrecht (18:32:21) (in thread): > the only naming issue is about the plots/tables themselves

Aaron Lun (18:56:03) (in thread): > Oh yeah, that was the one I was thinking of.

Aaron Lun (18:56:22) (in thread): > I think otherwise, the names are unnecessary as everything is embedded in the plot itself.

Aaron Lun (18:56:43) (in thread): > (Note that the red dim axis names need a bit of protection from absent names.)

Aaron Lun (18:58:03) (in thread): > (Or duplicate names)

Kevin Rue-Albrecht (19:00:37) (in thread): > argggh ok, i won’t merge the PR just yet then

Kevin Rue-Albrecht (19:00:49) (in thread): > damn users who don’t name their red dim

Aaron Lun (19:01:43) (in thread): > You could extract the naming scheme for the red dim choices fromdynamicUI.R; make it a bit more elegant (e.g., to avoid modifying the names when they are unique), and apply it to.make_redDimPlot.

Kevin Rue-Albrecht (19:01:51) (in thread): > they already reduced their red dim names to acronyms… to be honestSCEshould probably enforce names on that slot

Aaron Lun (19:02:09) (in thread): > It did, at the start.

Kevin Rue-Albrecht (19:02:10) (in thread): > doesn’t really make sense having unnamed red dims

Kevin Rue-Albrecht (19:02:15) (in thread): > ah

Aaron Lun (19:02:21) (in thread): > And then somewhere along the line… it stopped.

Aaron Lun (19:02:57) (in thread): > Someone also asked for unnamed spike-ins… I quickly put a stop to that madness.

Kevin Rue-Albrecht (19:03:01) (in thread): > ok

Kevin Rue-Albrecht (19:03:37) (in thread): > that’s a job for another day, when i’m motivated enough to think about all the thing that can go wrong

Aaron Lun (19:03:47) (in thread): > Well, arguablly the assysshouldall be named as well, but that was a battle that was lost some time ago.

Kevin Rue-Albrecht (19:04:08) (in thread): > actually, that makes sense too

Kevin Rue-Albrecht (19:04:18) (in thread): > any historical reason why the fight was lost?

Aaron Lun (19:04:34) (in thread): > ¯*(ツ)*/¯

Aaron Lun (19:04:47) (in thread): > Probably something technical and compsci-ey.

Kevin Rue-Albrecht (19:05:05) (in thread): > meh.

Aaron Lun (19:08:41) (in thread): > Anyway, back to the main topic; the panel names are not going to change. I will add a note to the issue.

Kevin Rue-Albrecht (19:09:33) (in thread): > Ok. It will be a nice feature, but I wasn’t particularly bothered by it yet

Kevin Rue-Albrecht (19:10:32) (in thread): > i’m just glad that people are picking on small aesthetic stuff like that: means that the main functionalities of the app are on target

Aaron Lun (19:15:50) (in thread): > See my note. We might be able to do a good-enough job by adding a title to each plot.

Aaron Lun (19:16:14) (in thread): > For example, the reduced dimension plots would be titled “PCA” or whatever, and then the axes could just go back to being “Dimension 1” etc.

Aaron Lun (19:17:38) (in thread): > This would make it a lot cleaner if we had to disambiguate unnamed entries with more numbers. Otherwise you’d get(1) PCA Dimension 2, which is pretty weird.

Kevin Rue-Albrecht (19:18:11) (in thread): > mmmh

Aaron Lun (19:19:43) (in thread): > Titles for the other plot types are pretty simple; just do A vs B for whatever is being plotted (or just A, if there is nothing on B).

Kevin Rue-Albrecht (19:19:43) (in thread): > simple as pi to move the red dim type to title, i’ll think about the disambiguation with a clearer mind tomorrow/soon

Aaron Lun (19:20:24) (in thread): > Okay, I’ll leave it to you then.

2018-02-10

Charlotte Soneson (05:45:08): > Just to say that I’m working on the heatmaps now, if everything works out I will push an initial scaffold later today.

Aaron Lun (07:09:42): > Seet

Aaron Lun (07:09:44): > sweet

Aaron Lun (07:10:09): > Fleshing out my response to reviewer 1…sigh

Aaron Lun (07:11:20): > Note that, for the heatmap prototyping, because it won’t be interacting with any other plots yet, it may be easier/faster to prototype in a completely separate shiny server/UI framework.

Charlotte Soneson (10:55:42): > Ok, first crude heatmap prototype is now in theheatbranch. Many issues still remain though: > - Column ordering is not yet possible to change > - Shall we allow coloring by more than one column? > - Color also by gene expression? > - Currently the size of the coloring bar changes with the number of genes (since each gene row is 1 unit wide, but the actual space corresponding to 1 unit changes with the number of genes, and I defined the color bar to be 0.6 units) > - Currently only gene input via selectize is possible > - Colors are ugly (I’m not using the provided colormaps yet for the colData coloring) > - No way to reorder the genes except deleting a gene and retyping/selecting it in the position where one wants it > - Color by “None” doesn’t actually remove the coloring (we need a.process_colorby_choice_for_heatmaps()function > - Documentation needs updating > > I’ll keep on working on it, but it may not be today.

Aaron Lun (13:01:47): > GUARGH

Aaron Lun (13:01:52): > SICK OF REVIEWER 1

Aaron Lun (13:02:00): > Gonna do some iSEE coding for a change

Aaron Lun (13:17:32): > Fortunately, one of my colleagues gave me some cake to get me through the night.

Aaron Lun (14:19:51) (in thread): > This is done, except for the hyperlinks.

Kevin Rue-Albrecht (14:36:55): > Just realised i forgot to turn on slack today. Nice to hear about the heat map prototype

Kevin Rue-Albrecht (14:41:10): > I still have a few figures to put together, so I probably won’t be able to look at iSEE tonight, i’ll put a bit of effort in tomorrow, to finish up my branch at least (information in plot title, subtitle, and maybe throwing in the n of N samples selected, too while I’m at it)

Kevin Rue-Albrecht (14:42:34): > shaaaaame:Merging #133 into master will decrease coverage by 0.97%.

Aaron Lun (14:44:52): > Yeah, well, there’s plenty more where that came from.

Aaron Lun (15:01:33): > The other thing you have to consider with heatmap gene clustering is that you’ll need to center them.

Aaron Lun (15:01:46): > Otherwise all highly expressed genes will cluster together, regardless of their relative expression profiles.

Aaron Lun (15:05:09): > Holy fuck:https://gist.github.com/vnijs/2e6eec27eaea12beec00

Aaron Lun (15:05:31): > Drag and drop in selectize; this would make it really easy to arrange stuff on a heatmap.

Aaron Lun (15:06:04): > We can automatically suggest an order based on cluster; but the user is also free to fiddle with it.

Charlotte Soneson (15:10:32): > cool!

Aaron Lun (15:56:04): > Moreover, we can link to row statistics table, by simply updating the selectize upon any row selection. (This would be strictly additive, clicking on another row will not delete existing selections).

Aaron Lun (15:57:08): > We can add two buttons to the heatmap: “Cluster genes”, which will cluster the genes, and “Update heatmap”. The latter is important as a button as the heatmap is much larger than the other plots in terms of data points (Ncells * Nselected genes) so it would probably be unwise to have it fully reactive.

Kevin Rue-Albrecht (15:57:30): > yep for button

Aaron Lun (15:58:39): > However, I’m still not particularly convinced of the utility of brushing on the heatmap. I’m not even sure how we could engineer zoom for it, if we’re not going to usecoord_cartesianin aggplotframework.

Aaron Lun (15:59:39): > On a separate note; I think ggplot itself is pretty fast, the row data plots have about 20000 points and render very quickly.

Kevin Rue-Albrecht (16:01:07): > the other think that i was recently thinking about is whether sending a ‘color’ brush to a heat map would makes sense/be useful or not

Kevin Rue-Albrecht (16:01:37): > i picture it as a bunch a red pixel scattered around the heat map

Aaron Lun (16:02:06): > It would be possible to have an extra colour bar denoting brushed/unbrushed.

Aaron Lun (16:02:32): > But red pixels in the heatmap itself wouldn’t make much sense, this would imply some brushing of specific cell/gene combinations.

Aaron Lun (16:03:19): > The choice would be analogous to “Brush to restrict” vs “Brush to color”

Aaron Lun (16:03:56): > This is probably limited to the cells, as the genes must be pre-selected so there’s not all that much brushing that can be done.

Aaron Lun (16:07:24): > On another note, we can useinput$tableID_rows_allto import the rows that are currently being shown on a linked row table. So you could search in the row table, and then import the search (not the selection) into the gene list for the heatmap.

2018-02-11

Aaron Lun (08:53:55): > Hello? Is anyone there?

Kevin Rue-Albrecht (08:54:00): > yup

Aaron Lun (08:54:06): > Oh good.

Aaron Lun (08:54:16): > Just wanted to know.

Aaron Lun (08:54:22): > Sort of quiet in the office.

Kevin Rue-Albrecht (08:54:50): > god, if you count all the times I cited your F1000 workflow in the paper as distinct citations in the manuscript that I’m editing right now, you’d be rich

Aaron Lun (08:54:56): > lol

Kevin Rue-Albrecht (08:55:44): > so you work from the office on weekends too, I feel from the messages at least the last few weekends?

Kevin Rue-Albrecht (08:56:38): > I’d go as well, to enjoy the large screen of the desktop. But that’d mean to get out of my pyjamas:stuck_out_tongue_winking_eye:

Aaron Lun (08:56:59): > yep

Aaron Lun (08:57:48): > My home computer runs on an AMD semptron. Made in 2004.

Aaron Lun (08:57:55): > So… not conducive to work.

Kevin Rue-Albrecht (08:58:17): > ahhh… not all things age well:grin:

Kevin Rue-Albrecht (08:58:30): > computers most of all

Aaron Lun (09:00:05): > I can’t even watch 720p videos without it crashing.

Kevin Rue-Albrecht (09:01:42): > I’m just trying to picture my favorite YouTube playlists with 8-bit music instead ^^

Kevin Rue-Albrecht (09:17:14): > (I can’t be particularly talkative for the next hour or so, sifting through a manuscript, both proof-reading and replacing for the first time all the “PMID: xxxxx” by the appropriate EndNote reference). > That ambivalent moment where you both enjoy seeing the project coming to a close, and hate it for all the tedious editing bits to do

Kevin Rue-Albrecht (09:17:56): > kind of addressing a reviewer’s comment:wink:

Aaron Lun (09:21:53): > ok

Aaron Lun (09:22:12): > I am trying to figure out whether it’s worth recompiling R with--enable-memory-profilingto deal with a reviewer’s comment.

Kevin Rue-Albrecht (09:27:39): > i was about to say “lol”, but i see the dilemna/pain

Aaron Lun (09:32:01): > Guh I’ll just do it.

Aaron Lun (09:32:06): > And work oniSEEin the meantime.

Kevin Rue-Albrecht (09:45:20): > finally:sleepy:Damn you Pubmed, (e.g.https://www.ncbi.nlm.nih.gov/pubmed/15723809)

Kevin Rue-Albrecht (09:45:28): > Error occurred: The following PMID is not available: 15723809

Kevin Rue-Albrecht (09:46:09): > had to download a bunch of RIS/EndNote/Bibtex files straight from the individual journal websites

Aaron Lun (10:11:02): > Well, the memory profiling told me absolutely nothing. Why? BecauseRprofmemdoesn’t capture memory allocations that aren’t performed by R’s C API!

Kevin Rue-Albrecht (10:12:03): > can’t remember last time i played with that feature:confused:

Aaron Lun (10:35:37): > Okay, enough of that.

Aaron Lun (10:35:43): > Going to do something enjoyable instead.

Kevin Rue-Albrecht (10:36:44): > as it happens, i also just snapped, and went to finish up my reddim names branch

Kevin Rue-Albrecht (10:38:25): > so do we agree on: > -title="(1) TSNE"if the reddim is named > -title="(1)"if the reddim is not named?

Aaron Lun (10:38:39): > Yeah, that’ll be fine.

Kevin Rue-Albrecht (10:38:41): > or should the latter be a bit more verbose?

Aaron Lun (10:39:00): > Hm… well, we should go with whatever is in the select options.

Kevin Rue-Albrecht (10:39:03): > I don’t want to over-complicate things

Aaron Lun (10:39:06): > As long as those are sync’d.

Aaron Lun (10:39:46): > I would suggest refactoring out the function that generates the names in the SelectInput indynamicUI.R, so you can re-use the same code when generating the title.

Kevin Rue-Albrecht (10:40:00): > i was just looking at it

Kevin Rue-Albrecht (10:40:22): > makes sense, to avoid copy-pasting or writing it differently

Kevin Rue-Albrecht (10:40:46): > goes inmisc.R?

Kevin Rue-Albrecht (10:41:28): > ordefaults.R?

Kevin Rue-Albrecht (10:41:44): > there’s a bit of renaming going on in the latter already

Kevin Rue-Albrecht (10:42:06): > ah no I meantconstants.R

Aaron Lun (10:43:28): > Maybe just leave it indynamicUI.R, not sure that it really belongs in constants.

Aaron Lun (10:43:48): > And misc.R is intended solely to take things out of iSEE.R

Aaron Lun (10:44:00): > But whatever feels natural.

Kevin Rue-Albrecht (10:44:01): > ok, makes sense too

Aaron Lun (10:56:39): > Oh selectizeInput is NOT happy with the thousands of entries it’s being asked to handle.

Kevin Rue-Albrecht (10:57:21): > trying to decide; what do we want as a title for colData scatter plots?"covariate_y vs. covariate_x"?

Kevin Rue-Albrecht (10:58:01): > (just found out a nice feature of Slack: if you hit the up arrow right after sending a message, it opens the ‘edit message’ mode)

Aaron Lun (10:58:13): > Yeah, that should be fine.

Kevin Rue-Albrecht (10:58:43): > ok, i’ll put it like that for now as a sort of placeholder, we can refine later if we want

Kevin Rue-Albrecht (10:58:56): > selectize went on strike?

Aaron Lun (10:59:15): > Only when we ask it to drag and drop. Then it becomes really unhappy.

Aaron Lun (10:59:36): > Actually, it seems unhappy either way.

Aaron Lun (10:59:46): > Quite a long delay to get the app running.

Aaron Lun (11:00:32): > Is anyone else noticing this?

Kevin Rue-Albrecht (11:01:06): > i do wait a few seconds, on thenamed_reddimbranch

Kevin Rue-Albrecht (11:01:50): > i can’t tell when exactly the delay increased that noticeably

Aaron Lun (11:02:39): > On the heat one we wait a lot longer for the UI to even render.

Aaron Lun (11:02:43): > Let alone show the plots.

Kevin Rue-Albrecht (11:03:17): > hm…:confused:

Kevin Rue-Albrecht (11:04:20): > it’d be really nice if we could have a way like unit tests, to automatically measure the time for the app to initialise, for every commit

Kevin Rue-Albrecht (11:04:38): > no clue if that’s possible, but it would help track down that kind of issues

Aaron Lun (11:05:08): > https://stackoverflow.com/questions/35664657/r-shiny-optimize-page-loading-time-with-updateselectizeinput - Attachment (stackoverflow.com): R Shiny - Optimize page loading time with updateSelectizeInput > Our shiny page has multiple selectizeInput controls, and some of them have long lists in their drop-down boxes. Because of this, the initial loading time is very long as it needs to pre-fill drop-d…

Kevin Rue-Albrecht (11:05:40): > at the moment, testing it manually if 1) subjective, 2) depends on the machine and the current CPU load

Kevin Rue-Albrecht (11:06:18): > ideally, we should get Travis to do that, objectively

Aaron Lun (11:11:47): > Man, now it’s lightning fast.

Aaron Lun (11:11:54): > Using server-side storage of the row names.

Aaron Lun (11:12:07): > Oh, and drag and drop.

Aaron Lun (11:12:08): > Sweet as

Kevin Rue-Albrecht (11:12:10): > ahhh yeah there is a TRUE/FALSE option isn’t there

Aaron Lun (11:12:52): > @Charlotte Sonesonare you working on this right now? I’m just going to move some things around.

Aaron Lun (11:13:12): > Like for example, y-axis doesn’t make much sense for the heatmap, there’s always going to be features.

Charlotte Soneson (11:13:53): > Sure, I’m not working on it right now. My thinking with XAxis/YAxis was that one might want to transpose the heatmap

Aaron Lun (11:14:12): > Do people do that?

Charlotte Soneson (11:16:19): > Don’t know. Maybe one could, depending on the ratio of samples/variables

Aaron Lun (11:16:43): > Hm.

Aaron Lun (11:20:14): > Do we need colouring options for the heatmap?

Aaron Lun (11:20:26): > I mean, all the colours should be pr-defined via ECM.

Aaron Lun (11:20:43): > And based on what column data you choose to order on.

Kevin Rue-Albrecht (11:21:02): > think so, I was already asked to use different color maps in projects, so I suspect it’ll be the same for iSEE

Kevin Rue-Albrecht (11:22:16): > e.g. > green-black-red for microarray fold-change > black-purple-yellow for logcounts, typically > blue-yellow-red for row z-scores of gene expression typically

Aaron Lun (11:22:40): > yes, but that should be defined in the ECM.

Kevin Rue-Albrecht (11:22:50): > oh yeah definitely

Aaron Lun (11:23:05): > so what’s the need for explicit colouring options in the heatmap?

Kevin Rue-Albrecht (11:23:13): > (btw ignore the fold-change thing, doesn’t apply to us)

Aaron Lun (11:23:51): > well, we’ll need to compute log-fold changes as well, actually

Aaron Lun (11:24:02): > you can see if you chuck in actb in the heatmap that it just doesn’t look very good

Kevin Rue-Albrecht (11:24:10): > what do you mean? rowData colours for genes, colData colours for samples, and assay colours for the tiles, no?

Kevin Rue-Albrecht (11:24:17): > or is there more to take care of

Aaron Lun (11:24:27): > No, as in an explicit panel for heatmap colours.

Aaron Lun (11:24:35): > Because all the colours for all the variables are already defined.

Aaron Lun (11:24:46): > There is no need for extra colour specification from the user.

Kevin Rue-Albrecht (11:26:14): > Not sure I follow the ‘explicit panel’ part. Your last two points was what I was talking about

Aaron Lun (11:27:10): > So you know how all the other panels have a coloring parameters section?

Aaron Lun (11:27:15): > I’m saying that a heatmap doesn’t need that.

Aaron Lun (11:27:20): > Because there are no choices to make.

Kevin Rue-Albrecht (11:27:21): > ahhhh got you now

Kevin Rue-Albrecht (11:28:06): > Mmmmh, I think you’re right. Point of a “heat” map is that it’s always coloured.

Kevin Rue-Albrecht (11:28:47): > Oh wait hang on. User would still need an explicit colour panel to decided whichassaythe colour data represents, no?

Kevin Rue-Albrecht (11:29:03): > or is that defined elsewhere, for each particular heat map?

Kevin Rue-Albrecht (11:30:07): > Let’s imagine they want to see the heat map with ‘logcount’ colouring and ‘tpm’ colouring side by side. They’ll need a colour panel to select those two sources of colors separately for each heat map

Charlotte Soneson (11:31:20): > I guess the user order the cells by one covariate and color the “annotation bar” according to another

Aaron Lun (11:35:21): > tHAT SHOULD BE INT HE PLOTTING PARAMETERS

Aaron Lun (11:35:24): > whoops

Aaron Lun (11:35:43): > because it’s a fundamental part of what’s being shown, rather than an aesthetic overlaid on top.

Kevin Rue-Albrecht (11:35:51): > ahhhhhhhhh

Kevin Rue-Albrecht (11:36:13): > With you now. Yep. No colour panel needed.

Charlotte Soneson (11:37:26): > Ah yes, I guess the coloring can go there too, since the number of annotation bars depends on the choice.

Charlotte Soneson (11:37:43): > So it is just not overlaid on something that is there anyway

Aaron Lun (11:42:25): > In that case, I’ll take the liberty of excising the heatmap colour options.

Aaron Lun (11:45:04): > I’ll also remove the y-axis choice; I can’t really imagine a strong demand for the transposed version.

Charlotte Soneson (11:45:14): > Ok, sure

Kevin Rue-Albrecht (11:47:54): > i’ve reached something apparently stable for plot title names, although it gets a bit ugly for gene-gene featExprs plotsgene (assay) vs gene (assay)

Aaron Lun (11:48:47): > Don’t worry about the assay in the title, I think.

Aaron Lun (11:49:01): > Poeple can see the axes for more detail, the title just gives all info in the glance.

Kevin Rue-Albrecht (11:49:07): > i don’t think we want to change it, but i noticed that we don’t let users plotsgene (assay1) vs gene (assay2), instead both gene expression are always from the same assay

Aaron Lun (11:49:16): > Yes, I had thought about that.

Aaron Lun (11:49:31): > On balance, it’s probably the right thing to do.

Kevin Rue-Albrecht (11:49:45): > maybe something low priority for the backburner, if there is some demand

Aaron Lun (11:50:18): > Well, as in, it is the right thing to NOT allow them to change it.

Aaron Lun (11:50:41): > Currently, the setup ensures you’re alway splotting the same thing against each other.

Aaron Lun (11:50:56): > If you provided options to have different assays, users woul dhave to manually sync them together.

Kevin Rue-Albrecht (11:51:26): > i likesplotting, we should use that shorthand forscatterplotting

Kevin Rue-Albrecht (11:52:16): > Anyway, I completely agree. It’s the superfluous feature that would get used once every blue moon

Aaron Lun (12:13:48): > Well, it’s done on my end, but there’s an unnecessary re-rendering of the heatmap upon re-rendering the UI, and I’m not sure where it’s coming from… will figure it out later.

Aaron Lun (12:14:49): > Well, to be precise, I know where it’s coming from; I don’t know how to avoid it.

Kevin Rue-Albrecht (12:27:48): > Alright, i pushed my changes too. Still on a side branch.

Aaron Lun (12:38:11): > Waiting for check to pass locally, then will push toheat.

Aaron Lun (12:54:31): > Feel free to close the issue once you’ve merged it.

Aaron Lun (12:56:07): > @Charlotte SonesonNote the new ColData storage field; this can be used to define how to order the cells.

Aaron Lun (12:56:19): > Incidentally, probably good to add a validate against empty ColData or FeatNames.

Kevin Rue-Albrecht (12:56:22): > sure, shall i merge now? it’s ready to go, but it’ll force everyone to update their own branch before they can merge

Aaron Lun (12:56:32): > Well, we’re gonna have to do that sooner or later.

Aaron Lun (12:57:26): > Okay, onto implementing this damn matrix multiplication.

2018-02-12

Aaron Lun (04:54:43): > ALRIGHT LET’S DO SOME OF THIS

Aaron Lun (04:57:54): > Nice titles@Kevin Rue-Albrecht

Aaron Lun (04:58:33): > Feature expression plot isn’t happy with another gene feature tho

Kevin Rue-Albrecht (04:58:41): > Thanks. Argh!

Aaron Lun (04:58:44): > just gives me 000Rik NA

Kevin Rue-Albrecht (04:59:02): > weird, I thought I tested the version that I pushed

Aaron Lun (05:00:12): > Getting NA’s in both y-axis and x-axis choice for featNames

Aaron Lun (05:00:25): > Which, if you think about it, is funny. Could be neuraminidase.

Kevin Rue-Albrecht (05:00:26): > ahhhhhh

Kevin Rue-Albrecht (05:00:32): > I didn’t testthatscenario

Kevin Rue-Albrecht (05:00:46): > only tested when linked from table

Kevin Rue-Albrecht (05:00:48): > damn

Kevin Rue-Albrecht (05:01:20): > I know exactly what it needs

Kevin Rue-Albrecht (05:01:36): > that’s the culprit:https://github.com/csoneson/iSEE/blob/master/R/plotting.R#L146 - Attachment (GitHub): csoneson/iSEE > iSEE - R/shiny interface for interactive visualization of data in objects derived from the SummarizedExperiment class

Kevin Rue-Albrecht (05:01:52): > I was processing linked tables and text input the same way, which I can’t

Aaron Lun (05:02:09): > In any case, I’m going to switch the feature names to selectize.

Kevin Rue-Albrecht (05:02:26): > I already got caught unaware when I realised (again) that linked tables send an integer rather than the gene id itself

Kevin Rue-Albrecht (05:02:42): > so i fixed one and broke the other without realising

Kevin Rue-Albrecht (05:03:11): > ok.. do you wanna fix the name as part of that selectize update then?

Aaron Lun (05:03:21): > No, it won’t touch that.

Kevin Rue-Albrecht (05:03:23): > ok

Kevin Rue-Albrecht (05:04:31): > well, in fact, if you switch the feature names to selectize, you’ll actually be implicitly fixing the issue

Kevin Rue-Albrecht (05:04:59): > because both linked tables and feature names will return an integer, which is what my code currently expects

Aaron Lun (05:05:55): > Hm. Not sure. Will it? selectize would still return a sttring, won’t it?

Kevin Rue-Albrecht (05:07:02): > depends what you give to selectize, if you give it a named input, you can show users strings yet return the associated integer to the input$

Kevin Rue-Albrecht (05:07:50): > or worst case, selectize might return the integer as a string, which can then simply be coerced back to integer

Kevin Rue-Albrecht (05:08:11): > but I think it will return the actual integer it you tell it so

Aaron Lun (05:13:24): > I think it returns a string, I tried this before with the PCA dimensions.

Aaron Lun (05:13:40): > or specifically, the named string of seq_along for the reddim slots.

Aaron Lun (05:13:59): > Well, you can sit tight and wait, or you can do it; your call.

Kevin Rue-Albrecht (05:16:10): > yep, i’ll look into it with your code update

Aaron Lun (05:47:58): > … harder than I thought.

Aaron Lun (06:53:34): > Does anyone know the priority ofrender*functions relative toobserve?

Kevin Rue-Albrecht (06:54:15): > ufff.. not right now, no

Kevin Rue-Albrecht (06:55:07): > however, i do remember something about setting priorities:https://stackoverflow.com/questions/24010346/priority-value-in-reactive-like-in-observe-r-shiny - Attachment (stackoverflow.com): Priority value in reactive() like in observe() (R Shiny) > How do you set the priority in which reactive() calculations are performed in Shiny? For example, there is a priority option in observe(), quoting the help file priority An integer or numeric …

Aaron Lun (06:55:29): > I need to stage the priorities so thatrenderUIexecutes first, followed by theupdateSelectizeInput, and then onlyobservefor the various fields.

Kevin Rue-Albrecht (06:55:43): > It was a couple of years go that I last looked at that, but I seem to remember that it was discouraged anyway by the RStudio people

Aaron Lun (06:56:17): > Otherwise if it tries to update the selectize before the UI re-renders, it will fail; and if it observes before the selectize updates, it will wipe any existing memory (as the re-rendered but not-updated input will be NULL).

Kevin Rue-Albrecht (06:57:19): > You might want to throw in someshiny::req(), if you can set up a condition that tracks whether something should happen only once something else is in place

Kevin Rue-Albrecht (06:58:22): > shiny::req()is what I’d call a requirementinvisibleto the user, in contrast toshiny::validate

Aaron Lun (06:58:40): > Hm…

Aaron Lun (07:01:59): > I’d prefer to use the priority system if that’s possible, it’s a more natural way of dealing with it.

Aaron Lun (07:02:15): > You can check it out onheatnow.

Kevin Rue-Albrecht (07:02:58): > No worries. I’m not close enough to the code right now to know what’s best, so it’s really your call.

Kevin Rue-Albrecht (07:03:23): > I’ll have to head off to a seminar. Might be able to check out the code from there

Kevin Rue-Albrecht (07:27:57): > nice:slightly_smiling_face:

Kevin Rue-Albrecht (07:28:42): > I just noticed thatrowDataPlothas issues withargument "title" is missing, with no default. I’ll take care of that this evening if thats alright.

Kevin Rue-Albrecht (07:29:29): > I’d also move the heat map legend tobottombtw

Aaron Lun (08:49:39): > FUCK I AM A CSS GOD

Kevin Rue-Albrecht (08:49:51): > lol

Aaron Lun (09:03:19): > Behold the new era!

Aaron Lun (09:05:00): > How fancy are the colours… ridiculously.

Aaron Lun (09:08:49): > <!channel>Please treatheatas the effective master for the time being; many things have been touched and improved.

Aaron Lun (09:09:33): > Or at least, make sure that if you fix things inmaster, that you merge them (carefully) intoheat.

Aaron Lun (12:43:47): > MARCO

Kevin Rue-Albrecht (13:28:52): > not sure whether to answer ‘polo’ or ‘SCARA2’

Aaron Lun (13:29:26): > lol

Aaron Lun (13:29:39): > Does everyone appreciate the new colours?

Aaron Lun (13:29:48): > Had to go pretty deep to get that to work.

Kevin Rue-Albrecht (13:35:10): > I like it. Just wondered if it’s possible to ‘soften’ a bit the purple, kinda ggplot-style of my memory is correct

Aaron Lun (13:35:36): > Knock yourself out, it’s inpanel_colours.R, though it has to be dark enough for the white text to be visible.

Kevin Rue-Albrecht (13:36:03): > Maybe it’s the Retina display, but I found it a tiny bit intense

Kevin Rue-Albrecht (13:36:17): > But overall, I like the combo of colours

Kevin Rue-Albrecht (13:37:37): > Just heading home now. I’ll fix the rowDataPlot title tonight, if it’s still there

Aaron Lun (13:37:53): > All colours are now centralized; so you only have to change it once, and everything else automatically reflects it.

Aaron Lun (13:38:03): > e.g. brush colors, colors on the graph, etc.

Kevin Rue-Albrecht (13:38:06): > That’s absolutely perfect!

Aaron Lun (13:38:23): > So feel free to play around with the colours to get something nice.

Aaron Lun (13:38:44): > Though (i) they should be dark enough to see the white text, but (ii) not too dark to get a nice brush.

Kevin Rue-Albrecht (13:39:04): > My previous comment got me to wonder whether we couldn’t just pick a ggplot2 palette, actually

Kevin Rue-Albrecht (13:39:22): > And benefit from their work setting up discrete colour maps

Aaron Lun (13:39:31): > Probably their palette is a bit too light

Kevin Rue-Albrecht (13:39:32): > But I like how it looks now

Aaron Lun (13:39:47): > You’d have to darken it a bit to get it to work.

Kevin Rue-Albrecht (13:40:04): > Yep I get you

Aaron Lun (14:15:32): > Okay, I’m going home.

Federico Marini (14:37:26): > catching up on the whole messages… > - i recallvalidate(need)was somehow better - at least in my cases - for providing a useful alt msg when some objects where not present, or some condiitons not satisfied

Federico Marini (14:38:40): > plus, - yes, somehow the updateselectizeinput done via server is superfast

Federico Marini (14:39:01): > - but also, no, I have no clue on the priority setting:disappointed:

Kevin Rue-Albrecht (14:56:00): > I agree thatvalidate(need)is a lot more informative.reqsimply prevents further processing without message until the condition is met.

Kevin Rue-Albrecht (14:56:56): > However, I have found this useful especially at startup to prevent re-rendering of plots asinputgets populated

Kevin Rue-Albrecht (15:01:17): > for instance inTVTB::tSVEI remember having a fairly linear chain of dependencies between a series ofreactiveand settingreqto prevent downstream ones to be computed until upstream ones were notNULL:https://github.com/kevinrue/TVTB/blob/master/inst/shinyApp/server.R#L288 - Attachment (GitHub): kevinrue/TVTB > TVTB - The VCF Tool Box

Kevin Rue-Albrecht (15:04:28): > But again, I’m not saying it’s “best practice” or that I recommend it in our case. That was my first ‘large’ Shiny app, and there’s a bunch ofad hocbits of code in there.

Kevin Rue-Albrecht (15:20:41): > i’m pushing back an update that giverowDataPlota title

Federico Marini (15:41:15): > about the million of points in ggplot2

Federico Marini (15:41:24): > here’s an interesting contribution

Federico Marini (15:41:26): > https://fronkonstin.com/2017/11/07/drawing-10-million-points-with-ggplot-clifford-attractors/#tidyverse - Attachment (Fronkonstin): Drawing 10 Million Points With ggplot: Clifford Attractors > For me, mathematics cultivates a perpetual state of wonder about the nature of mind, the limits of thoughts, and our place in this vast cosmos (Clifford A. Pickover – The Math Book: From Pyth…

Aaron Lun (17:46:40): > That’s more a case of generating the data points sequentially; it’s still one big dataframe that goes into ggplot, though.

Aaron Lun (17:47:01): > I wonder how fast it is.

Aaron Lun (17:47:43): > Re the reactives:observeEventhasignoreInit=TRUE, which avoids them triggering upon app startup.

Aaron Lun (17:50:55): > Or specifically, avoids triggering upon creation of the observer.

Aaron Lun (17:52:16): > You can check this yourself by insertingprintstatements inrenderPlotand seeing how many times they get hit. I vaguely remember checking this, and it only seemed to get hit once during startup - I might be wrong, though.

Aaron Lun (17:52:40): > In any case, we can’t really putreqinrenderPlot, because it doesn’t take values directly frominputanymore; they pass through the memory.

Aaron Lun (18:24:18): > The priorities are probably okay, upon reflection. But let me know if it breaks; this will manifest as deletion of existing entries in any of the featNames fields (color/x-axis/y-axis) when the UI is re-rendered, e.g., due to addition of new panels/deletion of old panels.

Aaron Lun (18:37:54): > It’s probably okay. It’s probably okay.

Aaron Lun (18:38:00): > I think.

Aaron Lun (18:38:14): > GAHH I’ll check it again tomorrow.

2018-02-13

Kevin Rue-Albrecht (03:36:44): > well, I’ll report weird behaviours as I encounter any, because I don’t think I could figure out how to debug this aspect of the app myself eheheh:sweat_smile:

Aaron Lun (05:31:33): > If there are any slowdowns in ggplot at large numbers of points, it may be due to transparencies or point size, which are inherently more difficult to render, I believe.

Federico Marini (09:43:25): > throwing in a thought: do we want heatmaps also to be linked in the graph once the brushes are on?

Federico Marini (09:43:42): > (and the links could come from two sides)

Aaron Lun (09:44:15): > Yes, that would be the idea.

Federico Marini (11:55:37): > … and another sparse thought - mostly relevant for the classic SummarizedExperiment objects

Federico Marini (11:56:13): > do we want to have some option for having the points labeled? In lowN-sample-land this could come in handy, also because the labels are given

Aaron Lun (11:56:51): > … not really.

Aaron Lun (11:56:56): > I mean, I guess we could

Aaron Lun (11:57:01): > but there’s not much to explore in such cases.

Aaron Lun (11:57:25): > I mean, do you really need an interactive framework to deal with 6 samples?

Kevin Rue-Albrecht (11:57:57): > i’d rather focus on showing label information on hover

Aaron Lun (11:58:10): > that turns out to be much harder than first thought.

Aaron Lun (11:58:15): > We’d have to switch to plotly

Kevin Rue-Albrecht (11:58:16): > but not labels on the plot itself

Kevin Rue-Albrecht (11:58:27): > arf

Federico Marini (11:58:44): > Germans would say Jein as a mix of ja and nein. I was only thinking of the wetlab people grabbing the SE and doing lots of plots on their own

Charlotte Soneson (11:58:58): > They can color the samples by ID:slightly_smiling_face:

Federico Marini (11:59:03): > true that

Federico Marini (11:59:29): > ok, right. they could throw in a factor for the IDs

Federico Marini (12:00:36): > ok, closing my own issue:smile:

Aaron Lun (12:00:56): > I mean, hover wouild be the ideal way to do it; you get the sample names as you hover over the plot.

Federico Marini (12:01:13): > rightey. but it’s not natively there as in plotly

Aaron Lun (12:01:13): > Of course, at ~millions of points,t his might be stupid.

Federico Marini (12:01:59): > BTW, talking about other cool stuff going on. This can be a good “competitor”, although we have a different focus

Federico Marini (12:02:01): > https://genomebiology.biomedcentral.com/articles/10.1186/s13059-017-1382-0 - Attachment (Genome Biology): SCANPY : large-scale single-cell gene expression data analysis > Scanpy is a scalable toolkit for analyzing single-cell gene expression data. It includes methods for preprocessing, visualization, clustering, pseudotime and trajectory inference, differential expression testing, and simulation of gene regulatory networks. Its Python-based implementation efficiently deals with data sets of more than one million cells ( https://github.com/theislab/Scanpy ). Along with Scanpy, we present AnnData, a generic class for handling annotated data matrices ( https://github.com/theislab/anndata ).

Federico Marini (12:02:41): > or at least, something with slightly similar focus, different language, yet applicable to the whole body of big datasets

Aaron Lun (12:04:25): > ah, scanpy.

Aaron Lun (12:04:32): > I was wondering where that was.

Federico Marini (12:05:25): > was on biorxiv already, came out last week or so

Federico Marini (12:05:38): > I am biased on this, but I tend to like R more:smile:

Aaron Lun (12:05:51): > I like python as a language.

Aaron Lun (12:05:57): > But as an analysis framework, it sucks

Federico Marini (12:06:03): > scanRcould have been a nice name too

Aaron Lun (12:06:08): > I mean, i get incredibly frustrated trying to install anything.

Federico Marini (12:06:13): > but I am proud we came up with iSEE

Aaron Lun (12:06:14): > And I’m pretty good at my job.

Federico Marini (12:06:18): > :smile:

Federico Marini (12:06:38): > still not convinced john took you for the looks, nah?

Aaron Lun (12:06:38): > So imagine how your average user will suffer

Aaron Lun (12:06:54): > With the typical pip error messages.

Federico Marini (12:07:04): > I also have had lots of pip-pain

Federico Marini (12:07:07): > ohjaaa

Aaron Lun (12:09:04): > Well, never mind them.

Aaron Lun (12:09:17): > Let’s just flood the field with good R software

Aaron Lun (12:11:20): > Or in other words

Aaron Lun (12:11:33): > you might visit python every now and then, but R is where the heart is.

Federico Marini (12:13:48): > I can’t say that better:slightly_smiling_face:

Federico Marini (12:20:54): > “slightly” unrelated: Charlotte is already aware of this, but since the madness started last week, I could not notdo this

Federico Marini (12:20:55): > https://github.com/federicomarini/aaaaR - Attachment (GitHub): federicomarini/aaaaR > aaaaR - Let the aminoacids do the talking!

Federico Marini (12:21:37): > the lady at home stared me with big, big, big eyes

Aaron Lun (12:22:22): > lol

Federico Marini (12:22:44): > fun fact: all of our names cannotbe completely turned into AA

Federico Marini (12:22:52): > we all have Os

Aaron Lun (12:24:38): > AlaAlaArgOAsp LeuSecAsp?

Aaron Lun (12:25:03): > U = selenocysteine, apparently.

Kevin Rue-Albrecht (12:25:35): > I don’t have O:grin:

Federico Marini (12:25:55): > The option to go to 3letters should also come at a debt timepoint

Federico Marini (12:25:59): > ops:smile:

Federico Marini (12:26:37): > there was a letter missing also for you, last time I checked - EDIT: ok, I should stop contributing to reaching the 10k msg limit

Aaron Lun (13:46:28): > Okay, I’m sick of dealing with this MS. Will work on iSEE for a few hours.

Aaron Lun (14:11:24): > @Kevin Rue-AlbrechtRow data plots need title.

Kevin Rue-Albrecht (14:35:06): > Oh I thought I did that

Aaron Lun (14:35:21): > Oh.

Kevin Rue-Albrecht (14:35:23): > I’m home in 5 min. Let me check

Aaron Lun (14:35:26): > Maybe i haven’t pulled.

Aaron Lun (14:35:52): > And indeed.

Kevin Rue-Albrecht (14:36:08): > Ok good for me

Kevin Rue-Albrecht (14:37:24): > I’m a bit fuzzy today: spent the entire day querying the Ensembl MySQL database to debug an annotation pipeline

Aaron Lun (14:37:30): > lol

Kevin Rue-Albrecht (14:37:54): > Works for mouse Ensembl 81 but not 91 (2 year difference)

Kevin Rue-Albrecht (14:38:14): > :tired_face:

Aaron Lun (14:39:30): > oh dear

Aaron Lun (15:25:56): > Dammit. It’s really annoying that selectize uses an empty string to signal a no-selection.

Kevin Rue-Albrecht (15:26:43): > i’d like to smile, but I can feel the frustration ’til here ^^

Aaron Lun (15:28:48): > I think we need to eliminate all uses of""as a valid input.

Aaron Lun (15:29:28): > A purge, basically.

Aaron Lun (15:31:06): > which would allow us to usereqwithout fear.

Kevin Rue-Albrecht (15:38:28): > I’ll risk a “that sounds sensible”, although I’ve kind of lost track of how much of a spring cleaning that would be in the code

Aaron Lun (15:43:10): > Big enough.

Aaron Lun (15:44:33): > The brushing is particularly problematic, as I was using the empty string to denote “do not receive a brush”

Kevin Rue-Albrecht (15:46:34): > canNULLbe a valid replacement? otherwise, a good ol’NA_character_should do the trick

Aaron Lun (15:47:11): > No, it won’t allow NULL.

Aaron Lun (15:47:48): > We could probably allow NA_character, though by that point, we’d need to be using a named vector, and if I’m doing that I might as well just use integers to signal valid entries.

Aaron Lun (16:00:50): > Holy shit these plots are getting evaluated ridiculous numbers of times at start up

Aaron Lun (16:00:59): > No wonder the damn thing takes so long.

Aaron Lun (16:01:29): > There’s 5 evaluations for the reduced dimension plots alone.

Kevin Rue-Albrecht (16:01:57): > i suppose it gets re-evaluated every time another plot is added (?)

Kevin Rue-Albrecht (16:02:33): > (i think we have 5 plots and 1 table on startup at the moment)

Aaron Lun (16:03:06): > Okay, fixed.

Kevin Rue-Albrecht (16:03:13): > wow, that was fast

Aaron Lun (16:03:15): > No, it was evaluated for every damn observer

Aaron Lun (16:03:39): > As an observer was created, it would trigger a plot re-rendering; which meant that we re-rendered for every observer.

Kevin Rue-Albrecht (16:04:00): > ahhh yep. brings me back toTVTB::tSVEthat one

Aaron Lun (16:04:01): > I’ll continue working on this tomorrow, I’m going home now.

Aaron Lun (16:10:37): > Pushed to heat, YMMV.

2018-02-14

Kevin Rue-Albrecht (03:28:52): > Playing with the app last night I noticed the heatmap is broken upon gene selection, but I guess that’s just work in progress?

Kevin Rue-Albrecht (03:30:00): > I’m going to look into the issue I opened myself: indicating count of brushed points on the plots

Kevin Rue-Albrecht (03:33:14): > Wednesday is a crazy day for me though : lab meeting and journal club that I can’t dodge

Aaron Lun (04:08:13): > Possibly.

Aaron Lun (04:08:18): > God you people wake up early.

Kevin Rue-Albrecht (04:10:08): > I used to be the opposite (work late/wake up late), had to change that a bit recently, still not super efficient in the morning, tbh:sleepy:

Kevin Rue-Albrecht (06:41:22): > Just reading the diffusion pseudotime (DPT) nature protocol for our journal club. Makes me wonder whether it’d be possible to overlay branches/trajectories, provided maybe a Bioc container for this type of information. > In its dumbest implementation, i’d picture it as ageom_pathin the reduceDim space with all cells ordered by pseudotime. > Obviously, 1) that wouldn’t deal with branches, where one cell would have to be connected to two daughter cells > 2)geom_pathwould drawN-1lines forNcells, so we’d rather look at some sort of smoothing (which I think was presented at the Boston Bioc last summer)

Kevin Rue-Albrecht (06:42:46): > https://www.nature.com/articles/nmeth.3971 - Attachment (Nature Methods): Diffusion pseudotime robustly reconstructs lineage branching > Diffusion pseudotime (DPT) enables robust and scalable inference of cellular trajectories, branching events, metastable states and underlying gene dynamics from snapshot single-cell gene expression data.

Aaron Lun (06:42:47): > Any reason why we need to draw lines, and we can’t use colouring to do the same job?

Aaron Lun (06:43:05): > E.g., colour from distance from the pseudotime trajectory

Kevin Rue-Albrecht (06:44:05): > hm.. true

Kevin Rue-Albrecht (06:44:40): > I’m thinking about highlighting branches

Kevin Rue-Albrecht (06:45:32): > branches may not be particularly obvious in reduced dim space, and colour by pseudotime only would not help discriminate them

Aaron Lun (06:45:32): > Yeah, you could do that too.

Aaron Lun (06:45:51): > Just colour by distance from the branch to which it is assigned.

Kevin Rue-Albrecht (06:46:41): > hm.. yep. I’ll keep thinking about it, but not rushed about implementing anything extra for now

Aaron Lun (06:46:49): > At the end of the day, there is some data assigned to each cell; we should be able to do something with it.

Kevin Rue-Albrecht (06:52:39): > Sure. Hopefully, users will find how to use the current features of iSEE to visualise that kind of data as colData. Who knows, we can always wait and see if someone comes up with a thoughtful suggestion for an extra feature of the kind.

Aaron Lun (06:59:52): > I mean, you can just colour by branch ID.

Kevin Rue-Albrecht (07:00:28): > yes, i picture them switching betweenbranch_idandpseudotime

Aaron Lun (07:01:09): > Or you can have two plots.

Kevin Rue-Albrecht (07:02:18): > duh

Kevin Rue-Albrecht (07:02:21): > sorry

Aaron Lun (09:27:22): > Alright, that’s enough revisions.

Aaron Lun (09:27:29): > Time to do something fun for a change.

Kevin Rue-Albrecht (09:39:50): > What’s the battle plan for the heat map at the moment? I can look at it this week end at the earliest.

Aaron Lun (09:40:23): > I will continue linking existing infrastructure to it.

Kevin Rue-Albrecht (09:43:22): > Ok. Something that crossed my mind when I looked at the heat map scaffold code is that we might ‘want’ to document a bit our plotting funcctions (create_plot, griddotplot, violinplot, …) about what they expect in and whichcmds[...]they generate. > This way, it would be make it easier to write new functions like the heat map, knowing what ins and outs it should have itself, to match the behaviour of existing functions

Kevin Rue-Albrecht (09:44:26): > From my limited experience with roxygen, I saw that one can write the doc for functions, while omitting the@exporttag, which allows to document functions that are internal to the package

Kevin Rue-Albrecht (09:45:37): > Anyway. It wasn’t really a priority as long we were refactoring the code frequently, but we may have reached a stage where the code is stable enough to be worth the effort

Federico Marini (09:51:44): > these functions will not be exported, but nothing forbids us to document them - probably it is not even needed to do it roxygen-ish style

Federico Marini (09:51:50): > but it would just be a nice addon

Federico Marini (09:52:10): > and or, we are aided in changing/maintaining the code afterwards

Aaron Lun (09:52:28): > I don’t see the need for Roxygen-specific stuff here, though.

Federico Marini (09:52:37): > IMHO it does not have to be ultra verbose, it can just be pieces of info

Federico Marini (09:53:03): > in the codetracking part, there is always a two/3-liner short desc of each function

Kevin Rue-Albrecht (09:53:58): > I don’t want to force an roxygen-style either. We just need to think whether there’s any chance that individual functions may end up exported in the future. In that case, having roxygen-style doc could turn the export on/off by only the@exporttag

Kevin Rue-Albrecht (09:54:28): > (as I understood it)

Kevin Rue-Albrecht (09:55:21): > It’d be interesting to see if users could call the (higher-level) code-generating functions from the CLI rather than having to open the app

Federico Marini (09:55:35): > well I am pro-documenting the unexported funcs too- especially after the rounds of refactoring, it makes life much easier for the three of us 4 that did not write the func itself:slightly_smiling_face:

Kevin Rue-Albrecht (09:56:14): > “What’s the typical template code to draw violin plots given a SCE object and a few arguments”

Kevin Rue-Albrecht (09:56:49): > they may not care about generating the absolutely precise command, just get the scaffold to fiddle with

Kevin Rue-Albrecht (09:57:13): > anyway, I had@Federico Marini’s last point in mind, too

Aaron Lun (09:58:37): > Knock yourselves out, then.

Kevin Rue-Albrecht (09:58:58): > we’ve all contributed bits and pieces everywhere, to the point that i’m not always immediately clear about the current behaviour of code that has changed since I last saw/touched it

Kevin Rue-Albrecht (10:00:12): > I’m expecting us to write bits of doc that will highlight things that we don’t fully understand ourselves individually, where someone else can jump in and clarify that one bit, so that we’re all on the same page

Kevin Rue-Albrecht (10:03:13): > (I’m especially keen to document what gets passed in the...of.create_plot, down to the individual specialised plotting functions, as some of those arguments get handed over 2-3 levels of functions)

Federico Marini (10:04:38): > fine for me - and yes, leaving a trace for someone else (whoever it may be) to pick up and continue developing the func, is what I think is optimal. > We should probably just do it peu à peu while we do the final edits

Kevin Rue-Albrecht (10:04:59): > nice French touch there:wink:

Aaron Lun (10:05:07): > gene selection is fixed in heatmap.

Federico Marini (10:14:54): > well germans use it too - dunno what the official eng translation would be for that

Kevin Rue-Albrecht (10:15:12): > ahhh

Federico Marini (10:15:47): > i thought bitewise was overkilling

Aaron Lun (10:29:21): > OMG it’s beautiful

Aaron Lun (10:29:27): > will push in a second

Kevin Rue-Albrecht (10:29:52): > :smiley:

Federico Marini (10:30:16): > (we knew you@Aaron Lunwould have taken iSEE dev as a battery charger in the fight against ms revision:slightly_smiling_face:)

Aaron Lun (10:30:32): > Oh, that’s almost done.

Aaron Lun (10:30:44): > Just need to run a few things overnight.

Aaron Lun (10:31:11): > And change all my “simple” references to “ordinary”.

Aaron Lun (10:31:16): > For “simple matrix”.

Aaron Lun (10:31:22): > Because apparently that was too confusing for people.

Aaron Lun (10:32:20): > Anyway… I think we should probably center the rows on the heatmap, otherwise we’d just get blobs of highly expressed genes and lowly expressed genes, and nothing about the differences between cells.

Federico Marini (10:33:57): > without row centering I always get ugly plots:stuck_out_tongue:

Federico Marini (10:34:17): > one other thought would be whether to make it Z’d

Aaron Lun (10:34:54): > scaling has never made much sense to me; a more relevant approach would be winsorizing.

Aaron Lun (10:35:18): > As in capping the extremes to preserve dynamic range.

Federico Marini (10:35:42): > well sometimes I think heatmaps in general are nothing but a graphical cheating instrument to support whatever claims one can have:stuck_out_tongue:

Aaron Lun (10:35:48): > Anyway, I’m going off to deal with something, but enjoy the importing functionality.

Federico Marini (10:36:07): > :pray:thank you!

Federico Marini (10:36:30): > unrelated to iSEE, relevant to sc-world: did anyone of you try this?https://github.com/lmcinnes/umap - Attachment (GitHub): lmcinnes/umap > umap - Uniform Manifold Approximation and Projection

Aaron Lun (10:38:35): > Nope, but I’ve seen it.

Aaron Lun (12:02:28): > Almost all empty strings have been cleared. The exception is the row stat table link choices (e.g., when colouring by a linked table), for which an empty string is a valid input when there are no row stat tables.

Kevin Rue-Albrecht (12:27:39): > Well done.

Kevin Rue-Albrecht (12:28:20): > Just coming out of journal club. Give me some time to recover and I’ll pull and have a look this evening

Kevin Rue-Albrecht (13:36:06): > brilliant ‘import features’ button:ok_hand:

Aaron Lun (13:40:12): > Works for both tables and plots.

Kevin Rue-Albrecht (13:40:32): > I tried it on the plot only

Kevin Rue-Albrecht (13:42:50): > eh.. if i ‘receive from table’, and ‘import features’, it still pick the first 100 genes

Aaron Lun (13:43:03): > Well, you need to put in a search string.

Kevin Rue-Albrecht (13:43:37): > ok, i just caught the latest pull, give me a second to build and test again

Federico Marini (13:44:37): > are you also having the issue with the vignette?

Kevin Rue-Albrecht (13:44:53): > lately i’ve built without vignette

Aaron Lun (13:45:38): > The tests have been fucked for a while.

Aaron Lun (13:45:52): > Probably true of the vignette, now that some options cannot be empty strings.

Kevin Rue-Albrecht (13:45:58): > ok.. not sure what’s going on: i typed a search string that reduced the rowTable to 6 genes, but there’s a superfluous gene in the heat map (7), which doesn’t match the string

Federico Marini (13:46:10): > should be something in the setup_memory where it tries the max on aDataFrameif that can help trackin it down

Kevin Rue-Albrecht (13:46:51): > I think it’s the first geneId in the object (scary how i got used to its id)

Aaron Lun (13:47:03): > Yes. Importing will only add to existing entries.

Kevin Rue-Albrecht (13:47:14): > ahhh

Aaron Lun (13:47:16): > You could imagine that people just want to add things.

Kevin Rue-Albrecht (13:47:19): > makes sense

Federico Marini (13:48:02): > very nice work on the heatmap feats

Kevin Rue-Albrecht (13:48:11): > btw, a mechanical reflex made me realise that Ctrl-A works to select and wipe out selectize

Kevin Rue-Albrecht (13:48:35): > no need for a “Clear all” button, if users ask

Aaron Lun (13:50:12): > Sweet, I was just thinking of that.

Federico Marini (13:50:53): > cool trick:slightly_smiling_face:

Federico Marini (13:51:17): > should it import only the one genes matching the string?

Federico Marini (13:51:34): > because for me it still gets also some of the …rik bunch

Aaron Lun (13:52:16): > It’ll add to whatever’s there.

Federico Marini (13:52:32): > ok

Aaron Lun (13:52:36): > Though the cntrl A doesn’t really work for me, not consistently…

Aaron Lun (13:52:46): > I got it to work once, trying to figure out how to do it again.

Federico Marini (13:52:50): > uh

Federico Marini (13:53:01): > creating a new heatmap and deleting it crashes the app

Aaron Lun (13:53:06): > Hm.

Aaron Lun (13:53:19): > Well, deleting the heatmap crashes it.

Federico Marini (13:53:23): > > Warning: Error in as.igraph.vs: Invalid vertex names > No stack trace available >

Federico Marini (13:53:28): > yep

Aaron Lun (13:53:45): > Probably need to add the heatmap to the set of igraph dependencies.

Aaron Lun (13:53:57): > Wait… not sure.

Aaron Lun (13:54:56): > okay, I know what the problem is.

Aaron Lun (13:55:25): > Will patch, but there’s a more general question of whether the heatmap should be included based on its links to the linked gene table plot.

Aaron Lun (13:55:49): > I would say not, because it’s not automatic and you still have to fiddle with the set of genes.

Federico Marini (13:56:03): > General thought: let us pat on our shoulders. I think we made a small contribution in putting a line bw. pre-iSEE and post-iSEE

Federico Marini (13:56:07): > :slightly_smiling_face:

Federico Marini (13:56:28): > fine with not having it automatically in

Federico Marini (13:56:42): > probably only the samples

Federico Marini (13:56:56): > if we brush into it

Aaron Lun (13:57:41): > The problem is that I set a precedent for this sort of thing with the rowDataPlot -> rowStatTable links.

Aaron Lun (13:58:06): > Though that, at least, is automatic.

Aaron Lun (13:59:18): > I mean, the heatmap will eventually receive a brush from a sample-based plot.

Aaron Lun (13:59:58): > So it will eventually fall into the graph.

Aaron Lun (14:00:31): > From a practical perpsective, there is no need for a gene-based link, because it’s not reactive; so I’m inclined to say no.

Aaron Lun (14:19:50): > What’s the deal with plotly? Do you need a plotly account to run it?

Aaron Lun (14:20:01): > Surely not, that would be crazy.

Aaron Lun (14:29:52): > Might be as simple as substituting inrenderPlotlyforrenderPlot, if someone is willing to test it out.

Aaron Lun (14:38:34): > Then we’d get access to the lasso selection.

Kevin Rue-Albrecht (14:54:21) (in thread): > it doesn’t work consistently when you click the field before doing the ‘Ctrl A’ thing?

Aaron Lun (14:55:12) (in thread): > Looks like I have to Ctrl-A twice, for some reason.

Kevin Rue-Albrecht (15:24:52) (in thread): > ok, well i can’t say why, i just tested again, and it works on the first try for me

Kevin Rue-Albrecht (15:38:03): > @Kevin Rue-Albrechtuploaded a file:Preview of subtitle info - File (JPEG): Preview of subtitle info

Kevin Rue-Albrecht (15:39:43): > however, i have the code in the wrong place at the moment, hence the placeholder values

Aaron Lun (16:00:12): > Nice.

Aaron Lun (16:00:26): > I will experiment with plotly tomorrow.

Kevin Rue-Albrecht (16:03:08): > i’m stuck wondering what’s best: passing the plot id or the ‘self brush’ to.create_plot. > I need to evaluate thebrushedPointsbit to know how many points are available, so that I may add thesubtitlebit to the.build_labscall

Kevin Rue-Albrecht (16:03:10): > argh

Kevin Rue-Albrecht (16:04:44): > eh no sorry, my brain is lagging behind

Kevin Rue-Albrecht (16:05:26): > i need to applybrushedPointson the coordinates of the plot itself, therefore after thecmds[["data"]]was evaluated

Kevin Rue-Albrecht (16:06:05): > but.create_plotdoesn’t have the id of the plot being drawn, only the id of the sender plots

Kevin Rue-Albrecht (16:06:45): > anyway, I think I’ll pass down the id of the plot iself tocreate_plotfor now, if it works we can always clean up

Aaron Lun (16:11:57): > That should be in the row names of param_choices.

Kevin Rue-Albrecht (16:12:06): > ahhhhhh

Kevin Rue-Albrecht (16:12:36): > true, now you remind me of how you process self-brushes, testing againsttransmitter

Kevin Rue-Albrecht (16:15:11): > awesome thanks

Kevin Rue-Albrecht (16:35:29): > … after far more stupid typos that I’m willing to share, I think I’m getting to the ~10-20 lines of codes that were actually needed to handle that feature forallplots (except heat map of course)

Aaron Lun (16:35:57): > Note that if we switch to plotly, there will be no brushes.

Kevin Rue-Albrecht (16:36:10): > :sob:

Aaron Lun (16:36:17): > There will only be a general selection.

Aaron Lun (16:36:27): > Because you can’t define a brush with a lasso

Kevin Rue-Albrecht (16:36:32): > yup

Kevin Rue-Albrecht (16:36:36): > let’s see how that goes

Aaron Lun (16:37:01): > This is largely fine - but it will be a pain when trying to reproduce the code, as we’ll have to report all the TRUE/FALSE indices on the page.

Aaron Lun (16:37:20): > Probably we’d need RleLogical or something like that.

Kevin Rue-Albrecht (16:37:36): > what T/F are we talking about here?

Aaron Lun (16:37:43): > Whether it was selected or not.

Kevin Rue-Albrecht (16:37:46): > ouch

Kevin Rue-Albrecht (16:39:32): > Don’t ask me why 317/379=0.8%:shushing_face:

Kevin Rue-Albrecht (16:39:56): > @Kevin Rue-Albrechtuploaded a file:Done - File (JPEG): Done

Kevin Rue-Albrecht (16:41:28): > and the answer is ~6 lines to implement the change (excluding passing down one extra argument down to.build_labs

Kevin Rue-Albrecht (16:45:31): > pushed

Kevin Rue-Albrecht (16:45:42): > enjoy:grin:

Kevin Rue-Albrecht (16:46:44): > (and sorry about the blurry photo, i was too lazy to screenshot and attach)

Kevin Rue-Albrecht (16:47:13): > damn that’s going to be nice for CyTOF data

Aaron Lun (17:03:03): > The plotly lassos are going to be awkward for the violin plots.

Aaron Lun (17:04:40): > We probably need to include all points within the range defined by the selected points.

Kevin Rue-Albrecht (17:49:55): > Alright. Going to sleep now. Curious to hear about how you do with plotly, I don’t have experience with it yet

Federico Marini (17:58:37) (in thread): > also for the no:wink:

Federico Marini (17:59:26) (in thread): > appreciate your putting 42 wherever 42 could fit

Federico Marini (17:59:44) (in thread): > nice usage of the subtitle

2018-02-15

Kevin Rue-Albrecht (03:29:38): > Before I forget, one thing that I’m not 100% happy my implementation last night is that it’s evaluating brushedPoints a second time.

Kevin Rue-Albrecht (03:58:51) (in thread): > hehehe.. thought of your wish to see that value more

Kevin Rue-Albrecht (03:59:12) (in thread): > but it looks even better now that real values are displayed

Kevin Rue-Albrecht (04:02:20): > btw@Aaron Lun, I suppose that you’ll test plotly on a separate branch, to avoid convoluting the heat map work with it? I mean branching offheat, notmasteritself

Aaron Lun (04:07:09): > Yes.

Aaron Lun (09:12:59): > I’d like to seeheatmerged sooner rather than later, it is getting very long.

Kevin Rue-Albrecht (09:13:41): > I was thinking that too. Wasn’t sure who was planning to do what on that branch before it gets merged

Kevin Rue-Albrecht (09:16:06): > Do we want to open a few issues on GH to clarify what needs to be done? > Part of it is integrating it comparably to the other types of plots. > Other part is to clarify how differently it behaves to the other ones (i’m thinking about the brushing aspects, which to my understanding are not in the cards right now, right?)

Aaron Lun (09:17:53): > Yeah sure

Kevin Rue-Albrecht (09:19:22): > my problem these days is that when I sit down in front on iSEE, I barely get the time to identify what needs to be done that I need to get back to something else. Issues would help me kickstart start

Aaron Lun (09:20:12): > Well, for starters, the plot titles get in the way of the plotly control bar.

Charlotte Soneson (09:20:51): > I was working on the heatmaps right now, and I’m getting stuck on the annotations. Basically, the problem is that there should be possibly many annotation bars, and they should all have their own color scale, which doesn’t work very well with ggplot2.

Kevin Rue-Albrecht (09:21:30) (in thread): > do you mean they overlay?

Aaron Lun (09:21:33): > Does it only want one annotation bar?

Aaron Lun (09:21:44) (in thread): > yeah. But there’s bigger problems to fix ATM.

Charlotte Soneson (09:21:48): > Only one color scale

Aaron Lun (09:21:55): > Huh. That’s pretty limiting.

Kevin Rue-Albrecht (09:22:51): > Well, the plot area will also eventually be limiting for the number of annotation bars that can be shown on screen, to be fair

Charlotte Soneson (09:23:30): > Maybe the legends will be limiting first…especially with lots of levels per annotation

Aaron Lun (09:24:46): > Perhaps we should restrict it to one coldata to order by?

Charlotte Soneson (09:25:18): > That would make everything easier:slightly_smiling_face:Ordering is fine btw, it is just the coloring

Charlotte Soneson (09:25:46): > Potentially you could have one continuous and one discrete

Charlotte Soneson (09:26:11): > Or it might be possible if you manually specify the exact color of each annotation level and usescale_color_identity.

Aaron Lun (09:26:28): > That shouldn’t be a problem, that’s what the ECM is for.

Charlotte Soneson (09:27:04): > Yeah…I can try and see if it works, I just saw a post about it

Aaron Lun (09:32:03): > I’m confident I know how to get plotly to work.

Aaron Lun (09:39:22): > It’s still a bit screwy with the ggplot aesthetics, but i can make the underlying shiny work with no issues.

Kevin Rue-Albrecht (09:42:32): > Cool. Happy to see you guys go ahead. Not sure where I can add to that without risking conflicts right now, so I think I’ll let you push some code first and see then how I can help

Kevin Rue-Albrecht (09:42:58): > I might get on that ‘documentation of internal functions’ maybe, in the meantime

Kevin Rue-Albrecht (09:43:34): > except if notable changes are expected, with the plotly udpate?

Aaron Lun (10:07:44): > The problem with plotly is that there is no longer a brushing box. We only get the selection, nothing about the user-drawn box or lasso.

Aaron Lun (10:09:05): > This is usually fine except upon re-rendering, at which point everything resets.

Kevin Rue-Albrecht (10:09:24): > argh

Kevin Rue-Albrecht (10:09:41): > yeah, so you can’t ‘draw’ the selected area anymore, with plotly, right?

Aaron Lun (10:09:45): > nope.

Kevin Rue-Albrecht (10:09:52): > or you’d have to guess it from the selection ^^

Kevin Rue-Albrecht (10:10:11): > like ageom_pathcomputed from the outermost points

Aaron Lun (10:10:40): > I’m not so worried about the path; I’d just like a way of highlighting the selected points.

Aaron Lun (10:11:12): > More generally, there’s no way to get persistence for selections in the plotly navigation bar. Oh well.

Aaron Lun (10:14:16): > That’s probably less of a concern, TBH.

Kevin Rue-Albrecht (10:24:27) (in thread): > before I forget, there may be ways to move the title or the plotly bar around, usingggplot::theme

Kevin Rue-Albrecht (10:24:57) (in thread): > but I’ll look at this later, once the bigger problems are resolved

Aaron Lun (10:29:41): > Hm. The plotly mode bar itself resets upon replotting, not just re-rendering.

Aaron Lun (10:29:54): > Which makes chained brushing really inconvenient.

Kevin Rue-Albrecht (10:31:33): > ugh

Federico Marini (10:58:27): > my couple of cents on the “big picture”: if the brush-linking does not work, it does not feel anymore like the “original concept” - which I digged pretty much, and I think many others did too:slightly_smiling_face:

Aaron Lun (10:58:35): > Basically, for plotly to work, we’d have to write another function (iSEE_ly?) that has fixed panel sizes and positions that are specified upon initialization of the app.

Aaron Lun (10:59:53): > Brushing by restriction would mostly be okay, but not for violin plots, where replotting is unavoidable.

Aaron Lun (11:00:20): > I mean, the major advantages of plotly over standard shiny is the ability to pan and lasso.

Aaron Lun (11:02:03): > So I wonder whether it is possible to get that functionality somehow else.

Aaron Lun (11:02:45): > Hell, we could just rip the lasso selection from plotly.js.

Aaron Lun (11:02:57): > And bind it to shiny ourselves.

Aaron Lun (11:06:17): > Nick it fromscatterD3, just like we took the collapsible box fromshinyBS.

Kevin Rue-Albrecht (11:09:31): > in all those cases, the brush would then return the data points selected rather than the definition of the brush, right?

Aaron Lun (11:09:41): > unfortunately, yes.

Federico Marini (11:10:00): > I have to say, the only thing I really would like to have is the lasso selection - the hover info is nice and so, but the lasso is damn cool

Aaron Lun (11:10:23): > This is possible with D3.

Aaron Lun (11:10:35): > https://github.com/skokenes/D3-Lasso-Plugin - Attachment (GitHub): skokenes/D3-Lasso-Plugin > D3-Lasso-Plugin - A lasso selection tool for D3

Aaron Lun (11:10:46): > The key is just binding it to shiny, which is done inscatterD3.

Aaron Lun (11:12:55): > We could even home-brew a lasso, using repeated clicks.

Aaron Lun (11:13:11): > That would be the best way to store all of the relevant information.

Kevin Rue-Albrecht (11:13:27): > well, i’m not too sentimental with having the brush definition: it’s probably even better if we compute it based on the selected point (it would add a bit of smoothing to the clunky manual selection), plus that time could come from the time saved counting the number of point in the brush (for my subtitle thing)

Aaron Lun (11:15:02): > Actually, I like the repeated clicks idea a lot. We can even update it very quickly by simply adding layers to the existing ggplot object, rather than doing a whole new evaluation.

Aaron Lun (11:15:32): > At each click, the plot will add a way-point; clicking back to the start will close the loop.

Aaron Lun (11:15:39): > Neat, huh.

Kevin Rue-Albrecht (11:15:46): > if possible, yeah!

Aaron Lun (11:15:54): > I’ll check it out this WE.

Aaron Lun (11:16:04): > Easier than refactoring it all for plotly.

Federico Marini (11:16:05): > this sounds cool

Kevin Rue-Albrecht (11:16:05): > how would the app know when the user is done clicking?

Aaron Lun (11:16:13): > When you close the loop.

Kevin Rue-Albrecht (11:16:19): > oh damn you said it

Aaron Lun (11:16:33): > Going to have a walk and think about this while my HDF5 timings run forbeachmat.

Aaron Lun (11:16:40): > Slows down all my IO.

Aaron Lun (11:17:57): > In any case, I’ve manually implemented a lasso before (in Javascript, no less!) so it shouldn’t be too hard.

Kevin Rue-Albrecht (11:18:32): > ah well, if you talk from experience, then i’ve got nothing to add:sweat_smile:

Aaron Lun (11:19:09): > The key is to make sure it’s as responsive as possible.

Aaron Lun (11:19:51): > Okay, going for my walk now.

Aaron Lun (12:10:56): > In the meantime, perhaps someone can figure out where the code spends most of its time when rendering the plot. I’d like to know whether it’s during the creation of theggplotobject, or in the final step where the ggplot object is actually shown.

Aaron Lun (12:27:01): > If it’s the final step, then… well, nothing we can do. But if it’s all the steps leading up to and including the creation of the ggplot object, then there’s a chance to avoid all this work when we’re just adding a brushing box or lasso points.

Kevin Rue-Albrecht (12:27:41): > absolutely. worth a look

Aaron Lun (12:28:18): > In the meantime, I have to figure out howbeachmatis being faster than theoretically possible.

Kevin Rue-Albrecht (12:48:46): > > function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10){ > return(42) > } >

Aaron Lun (14:18:18): > Finally finished my head-bashing session withscran’s unit tests.

Aaron Lun (14:18:22): > Ontobeachmatagain.

Aaron Lun (14:43:46): > Well, I just gave up on that. It wasn’t clear what was going on.

Kevin Rue-Albrecht (15:00:24) (in thread): > i’m just thinking back when i wrote and manually ran the unit tests: the code-writing functions seemed pretty fast, so i’m wondering whether it’s the rendering that’s slowing things down. I’m trying to look at it now

Kevin Rue-Albrecht (15:30:06): > what’sforce(rObjects[[plot_name]])for iniSEE.Ragain?

Kevin Rue-Albrecht (15:32:31) (in thread): > Anyway, it definitely doesn’t look like it’s in the plotting code. Although that was kind of obvious from the start considering that the slowdown is at boot time, and that plots refresh pretty fast once the app is up and running

Charlotte Soneson (16:17:50): > So, I have added ordering and coloring by annotations to the heatmaps (still haven’t managed to put a label on the annotations though), but I can’t test it since I just realized that I updatedDelayedArrayand nowscaterdoesn’t load…(it assumes thatArrayRegularGridis exported byDelayedArray, which it does not seem to be anymore). I am almost falling asleep so I will not solve it tonight, but I can push it to theheatbranch and rely on Travis for testing if someone else wants to have a look tomorrow…

Aaron Lun (16:35:38): > Uh.scatershouldn’t depend on ArrayRegularGrid.

Aaron Lun (16:36:16) (in thread): > Trigger replotting in response to updates to the reactive value with the same name as the plot.

Kevin Rue-Albrecht (16:36:58): > separately, i’m partially through time-stamping the initialisation of the app server-side, and all the way to the panel observers takes a mere ~2s so far

Aaron Lun (16:37:35) (in thread): > The question is whether or not we would benefit from have a stored ggplot object; then, when we get a new brush, we retrieve the stored object and just add a layer withgeom_rect. Would this be appreciably faster than re-rendering the entire plot?

Kevin Rue-Albrecht (16:39:17): > (getting to the brush observers now)

Kevin Rue-Albrecht (16:40:01): > nope, lighting fast too

Kevin Rue-Albrecht (16:45:15) (in thread): > well, it doesn’t seem to me like rendering plots is the issue, time-wise

Kevin Rue-Albrecht (16:48:14) (in thread): > ok thanks

Kevin Rue-Albrecht (16:48:59) (in thread): > i just got again to the dot-related plotting section, gets processed in less than a second too

Kevin Rue-Albrecht (16:50:00) (in thread): > i printed a message through each iteration of the loop: they all get printed within a second, while the app lag still follows all those messages

Kevin Rue-Albrecht (16:51:59) (in thread): > now i’m at the end: row table and heat map sections

Kevin Rue-Albrecht (16:55:04) (in thread): > ok.. must come from the UI side: i’ve timestamped all the server-side of the app and all computations are complete ~6s before the plots all show simultaneously

Aaron Lun (17:01:44) (in thread): > Maybe we need to test on a heavier example. TCGA?

Kevin Rue-Albrecht (17:07:52) (in thread): > I want indeed to test my freshly added progress bar on the TCGA next. > However, for the purpose of understanding why there is a 5s gap between the completion of.panel_generation(that feeds intooutput$allPanels) and the plots showing, there is no need for a data set larger than theallenone

Kevin Rue-Albrecht (17:08:54) (in thread): > right now, without knowing the details of how Shiny stacks the UI operations, I think it’s just about Shiny-side initialisation of the various plotting panels

Kevin Rue-Albrecht (17:09:48) (in thread): > if you like, I’ll push theprogressbarbranch that I’ve created, and includes all the timestamped console messages

Kevin Rue-Albrecht (17:10:33) (in thread): > so that you can see for yourself, because it’s a bit hard to picture it in Slack

Kevin Rue-Albrecht (17:14:20) (in thread): > there you goprogressbarpushed

Kevin Rue-Albrecht (17:18:51) (in thread): > I just tested on the TCGA and it’s ridiculously fast (the progress bar)

Aaron Lun (17:19:09) (in thread): > Yes, progress bars are basically useless.

Aaron Lun (17:19:29) (in thread): > Just to be clear; once the plots are set up, what’s the lag upon updating a plot?

Kevin Rue-Albrecht (17:20:05) (in thread): > thinking about it, I actually quite like seeing the progress bar flash through: it’s kind of patting ourselves on the back

Kevin Rue-Albrecht (17:20:32) (in thread): > might discourage a few users of complaining of any tiny lag

Kevin Rue-Albrecht (17:21:10) (in thread): > well, i wouldn’t call a ‘lag’ the spit second that it takes toupdatethe plots

Aaron Lun (17:21:17) (in thread): > Putting that aside. What’s the relative time required to make a ggplot object compared to printing it?

Kevin Rue-Albrecht (17:21:24) (in thread): > the only lag that I can see is to initialise them

Aaron Lun (17:21:38) (in thread): > Hm.

Kevin Rue-Albrecht (17:21:38) (in thread): > the ggplot objects are lighting fast to make

Kevin Rue-Albrecht (17:21:55) (in thread): > it’s the displaying or writing to file that takes most time

Kevin Rue-Albrecht (17:22:07) (in thread): > because a ggplot object is just a bunch of instructions

Kevin Rue-Albrecht (17:22:23) (in thread): > those instructions only seem to get evaluated at render/write time

Aaron Lun (17:22:34) (in thread): > Well, sometimes the dataframe mangling can take some time if htere’s a lot of points.

Aaron Lun (17:23:00) (in thread): > And one could iamgine reevaluation of the brushes would also be a pain.

Kevin Rue-Albrecht (17:23:11) (in thread): > do you mean the manglinginsideggplot (I can’t imagine any right now), or ours?

Aaron Lun (17:23:25) (in thread): > Ours.

Aaron Lun (17:23:35) (in thread): > And calculation of the jitter, etc.

Aaron Lun (17:24:07) (in thread): > plotly achieves its speed by translating the plot to JSON and then updating only the relevant layer.

Kevin Rue-Albrecht (17:24:12) (in thread): > hm.. you make me wonder whenourmanglingactuallyhappens

Kevin Rue-Albrecht (17:25:27) (in thread): > when does ourevalactually happens, you think?

Aaron Lun (17:25:52) (in thread): > WEll, yes, I would assume.

Kevin Rue-Albrecht (17:27:43) (in thread): > because i timed all the server-side calls, and even thepanel_generationthat’s the last thing in the UI. All of those things produce their console message ~5s before the plots initialise for the first time

Kevin Rue-Albrecht (17:28:48) (in thread): > i don’t see any later place to put a timestamp between my latest timestamp and the moment plots initialise

Kevin Rue-Albrecht (17:35:47) (in thread): > regarding your point aboutplotly: does it boot faster than our current app? or is it just a matter ofupdatingplots after they’re initialised?

Aaron Lun (17:36:08) (in thread): > updating plots. I’m not worried about booting.

Kevin Rue-Albrecht (17:37:12) (in thread): > Ahh ok then. Well i’m not so worried about updating to be honest. I find the current app fast enough as it is, even for the TCGA

Aaron Lun (17:37:19) (in thread): > If it’s actually printing the plots that soaks up time after the.make_redDimPlot(etc.) call, then there’s nothing we can do. But if it’s taking a few fractions of a second for the function to return, that suggests we can cut down time and improve responsiveness by caching the ggplot object.

Aaron Lun (17:41:53) (in thread): > In particular, cache the object and only update the brushing box - this would be pretty simple. The same principle could be used fo the lasso waypoints.

Aaron Lun (17:43:03) (in thread): > Or more generally, we could separate out the functions to constructplot.datafrom the generation of theggplotobject, which would save us a few milliseconds.

Kevin Rue-Albrecht (17:43:11) (in thread): > yeah updating only the brush layer makes sense

Aaron Lun (17:44:20) (in thread): > Though I guess printing out the plot takes so much longer, setup time is mostly negligible.

Kevin Rue-Albrecht (17:44:25) (in thread): > the ggplot object, minus the brush, can be cached, and then the brush layer is just added as agg_object+brush_layerat the end

Aaron Lun (17:44:40) (in thread): > Yes, that would be the idea.

Aaron Lun (17:45:11) (in thread): > Could you just give me an idea of how long it takes to return from the function, vs. how long it takes to show the plot?

Kevin Rue-Albrecht (17:45:11) (in thread): > well, we can try that at some point, but I guess it’s still relatively low priority given the current performance

Kevin Rue-Albrecht (17:48:21) (in thread): > hmm.. i’d say the progress bar flashes through in 0.5s, and the plot takes maybe up to a second to refresh

Kevin Rue-Albrecht (17:48:45) (in thread): > (allen data)

Aaron Lun (17:55:04) (in thread): > Try timing outside of the app using a similar approach totest_plotting.R.

Aaron Lun (17:55:25) (in thread): > Even half a second is worth saving when users are expecting an immediate response.

Aaron Lun (17:56:21) (in thread): > Basically,system.timethe actual.make_redDimPlotcall, and alsosystem.timethe save to file viapng(which I presume is what shiny is doing under the hood).

Kevin Rue-Albrecht (18:00:47) (in thread): > yeah it’s probably doing that to a temp file somewhere

Kevin Rue-Albrecht (18:01:10) (in thread): > i’ll have a look, probably rather this weekend better than tonight

Aaron Lun (18:06:02) (in thread): > My guess is that probably DelayedMatrixStats is depending on it, which causes its reverse dependencies to fail as well.

Kevin Rue-Albrecht (18:33:40) (in thread): > i’m probably just too tired, but i get a error when I try to use the setup code in my unit tests: > > > all_memory <- iSEE:::.setup_memory( > + sce, redDimArgs, colDataArgs, featExprArgs, rowStatArgs, rowDataArgs, heatMapArgs, > + redDimMax = 1, colDataMax = 1, featExprMax = 1, rowStatMax = 1, rowDataMax = 1, heatMapMax = 1) > Error in max(all_maxes[[x]], all_args[[x]]) : > invalid 'type' (S4) of argument >

Kevin Rue-Albrecht (18:34:02) (in thread): > seems to be at the lineall_maxes[[x]] <- max(all_maxes[[x]], all_args[[x]])

Kevin Rue-Albrecht (18:34:36) (in thread): > going to sleep now

2018-02-16

Charlotte Soneson (04:03:32): > Ok, I just pushed the ordering/coloring update to the heatmaps. I don’t know how we want to do with the annotation bars: since I defined the colors manually in order to be able to have multiple annotations, there are no colorbars generated automatically. It may take a lot of space to have them all, but it is difficult to interpret without them.

Kevin Rue-Albrecht (04:04:07): > well, that’s up to the user, how much information they want to display

Kevin Rue-Albrecht (04:04:34): > how does it look when you strech the heatmap panel to say the whole screen width?

Kevin Rue-Albrecht (04:04:57): > does it give enough extra space to add more colorbars I mean?

Charlotte Soneson (04:06:51): > Yes. I don’t know what’s happening to the color bars when I do that though, it looks ugly…perhapsgeom_segmentwasn’t a good way to go:tired_face:

Charlotte Soneson (04:08:00): > Or, well, I can see what’s happening, but it doesn’t look good

Charlotte Soneson (04:10:09): > That was a stupid choice

Kevin Rue-Albrecht (04:10:24): > ok. I don’t have much experience withgeom_segmentso I’ll have to look at it to see what you mean

Charlotte Soneson (04:10:50): > It is actually drawing a line for each sample

Charlotte Soneson (04:10:58): > A diagonal one, while it should make a box

Kevin Rue-Albrecht (04:11:06): > from the sound of it, I understand…. ah, exactly what you just wrote

Charlotte Soneson (04:11:07): > It looked nice until you zoom in

Charlotte Soneson (04:11:20): > I just was’t thinking far enough

Kevin Rue-Albrecht (04:12:29): > hm.. I know that ggplot only allows one colour scale per plot, but we can’t be the first ones who wish to have colour annotation on the side of heat map

Kevin Rue-Albrecht (04:13:34): > again, I’m biased towardComplexHeatmaponly by lack of experience withpheatmap, butComplexHeatmapmakes it really easy to have adata.frameof colour annotations. I suspectpheatmapcan do that too?

Charlotte Soneson (04:14:31): > Yes

Charlotte Soneson (04:16:34): > geom_rectinstead ofgeom_segmentworks, but then we run into the same problem since it needs afill, and thefillscale is already used for the heatmap itself…

Kevin Rue-Albrecht (04:17:57): > I wonder whetherfacets(2x2) could be hacked to have a panel with row annotations to the right, and a panel with column annotations at the top. But again, that sounds far from optimal

Charlotte Soneson (04:21:23): > We would still have the problem with only one color/fill scale.

Kevin Rue-Albrecht (04:21:39): > yeah.. because it’s alloneplot

Charlotte Soneson (04:21:53): > Otherwise we would have to combine different plots, which would cause issues with alignment

Kevin Rue-Albrecht (04:23:07): > mhhh, i’ve been googling the last 10min and I can’t find any example of ggplot with side annotations

Kevin Rue-Albrecht (04:23:32): > only grid-based stuff

Charlotte Soneson (04:24:38): > Actuallycowplotcan be used to align plotting regions, perhaps it is an option to generate separate plots for each annotation bar

Kevin Rue-Albrecht (04:26:28): > That could be an option. Still haven’t taken the time to learncowplot. Happy to see someone test out the idea on a new branch

Kevin Rue-Albrecht (04:28:11): > from the looks of it (https://cran.r-project.org/web/packages/cowplot/vignettes/introduction.html), this might work out with a bit of fine-tuning: > > plot2by2 <- plot_grid(plot.mpg, NULL, NULL, plot.diamonds, > labels=c("A", "B", "C", "D"), ncol = 2) >

Charlotte Soneson (04:29:23): > This is what I got with a quick test

Charlotte Soneson (04:29:30): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-02-16 at 10.28.52.png - File (PNG): Screen Shot 2018-02-16 at 10.28.52.png

Kevin Rue-Albrecht (04:29:50): > damn i’m pretty happy with that

Kevin Rue-Albrecht (04:30:16): > i’m sure we can squish the top annotation with some relative panel width magic

Charlotte Soneson (04:30:33): > Sure, you just setrel_heights

Kevin Rue-Albrecht (04:31:40): > ahhhhh… all those functions are making@Aaron Lun’s own magic superfluous these days:wink:

Kevin Rue-Albrecht (04:33:13): > while you’re fiddling with options, I’d suggest havingtheme(legend.position="top")for the column annotation panel,theme(legend.position="bottom")for the data, andtheme(legend.position="right")for the row annotation panel

Charlotte Soneson (04:33:36): > Ok. I’ll just push the version withgeom_rect()instead ofgeom_segment()toheatand then I’ll branch off that and try out cowplot.

Kevin Rue-Albrecht (04:33:58): > it’s a small price to pay not having all the legends in a single place, but it may actually help readability

Aaron Lun (04:52:00): > Huh?

Kevin Rue-Albrecht (04:52:20): > which part?

Aaron Lun (04:52:31) (in thread): > whoops, that should probably say nrow(all_args[[x]]).

Kevin Rue-Albrecht (04:52:32): > (i was just teasing about magic and wizard)

Aaron Lun (04:52:46) (in thread): > Not sure how that managed to get past. It ran fine for me.

Aaron Lun (04:53:01): > What is superfluous?

Kevin Rue-Albrecht (04:54:15): > nah, nothing superfluous, I just meant that this function may avoid the need to call upon home-brewed magic

Aaron Lun (04:54:36): > for the lasso?

Kevin Rue-Albrecht (04:54:55): > eh.. no, to align the heat maps

Kevin Rue-Albrecht (04:56:00): > basically, i just meant that for other situations, like the lasso, we’ll definitely need your magic, while in this case the nice and friendly functionrel_heightsdoesn’t require it

Aaron Lun (04:56:10): > oh

Kevin Rue-Albrecht (04:56:17): > ‘superfluous’ was clumsy of me

Aaron Lun (05:22:49): > Just saw this PIVOT paper on my google scholar feed:https://bmcbioinformatics.biomedcentral.com/articles/10.1186/s12859-017-1994-0 - Attachment (BMC Bioinformatics): PIVOT: platform for interactive analysis and visualization of transcriptomics data > Many R packages have been developed for transcriptome analysis but their use often requires familiarity with R and integrating results of different packages requires scripts to wrangle the datatypes. Furthermore, exploratory data analyses often generate multiple derived datasets such as data subsets or data transformations, which can be difficult to track. Here we present PIVOT, an R-based platform that wraps open source transcriptome analysis packages with a uniform user interface and graphical data management that allows non-programmers to interactively explore transcriptomics data. PIVOT supports more than 40 popular open source packages for transcriptome analysis and provides an extensive set of tools for statistical data manipulations. A graph-based visual interface is used to represent the links between derived datasets, allowing easy tracking of data versions. PIVOT further supports automatic report generation, publication-quality plots, and program/data state saving, such that all analysis can be saved, shared and reproduced. PIVOT will allow researchers with broad background to easily access sophisticated transcriptome analysis tools and interactively explore transcriptome datasets.

Aaron Lun (05:22:57): > Seems like they’re trying to be a galaxy replacement.

Kevin Rue-Albrecht (05:25:07): > something to pencil down as one of our own references, I guess

Kevin Rue-Albrecht (05:27:15): > i just pasted it in there:https://docs.google.com/document/d/1MW3MZQzuxkUBm795o-Rmm1to7VS5lx6FRT6xvhdK8RM/edit?usp=sharing

Kevin Rue-Albrecht (05:27:17): > @Kevin Rue-Albrechtshared a file:iSEE_manuscript_draft - File (Google Docs): iSEE_manuscript_draft

Aaron Lun (05:37:47) (in thread): > Is this fixed? Or should I do it?

Aaron Lun (05:48:47): > The heatmap looks nice, but it would be nice to get some annotations. I’m actually happy if you just have the name of the covariate on the heatmap; we can generate another plot containing the legend for all of the colours.

Aaron Lun (05:49:02): > A legend plotwithinthe “column data parameters” panel.

Charlotte Soneson (05:49:46): > I think the naming will work nicely withcowplot

Aaron Lun (05:50:02): > Okay.

Charlotte Soneson (05:50:15): > And also the filling of the annotation bars, currently it is only a colored frame around grey boxes

Aaron Lun (05:50:49): > Okay. Well, I’ll leave that to you, then.

Kevin Rue-Albrecht (05:52:46) (in thread): > It’s not fixed yet. I just spotted it before going to sleep. I was too tired and confused to think about fixing it right then

Aaron Lun (05:54:29) (in thread): > Well, it’s done.

Kevin Rue-Albrecht (05:54:41) (in thread): > nice. thanks!

Aaron Lun (05:56:44): > I’m going to refactor the internals so that it saves the ggplot objects from the scatter plots. This should make it a lot easier to add the brushes and waypoints for the lasso, as we can just add layers on top rather than going deep intoplotting.R.

Aaron Lun (06:14:46): > Not quite as easy as I thought, as you’d need to cache the commands as well…

Kevin Rue-Albrecht (06:15:32): > maybe i don’t understand, but aren’t the command cached, to show up in the tracker?

Kevin Rue-Albrecht (06:15:51): > or you mean caching the partial commands on top of the full ones?

Aaron Lun (06:16:28): > yes.

Kevin Rue-Albrecht (06:16:50): > note that one of the unspoken reasons why i initially started storing commands by section and names would be that they could be sliced and subsetted

Kevin Rue-Albrecht (06:17:41): > although that requires knowing deterministically what to expect in any one list of commands

Aaron Lun (06:17:54): > I mean, we could really break it up, right.

Aaron Lun (06:18:16): > We could have data generation observers; ggplot generation obsevers; and “extra” stuff observers.

Kevin Rue-Albrecht (06:18:38): > Not sure if we still have some ‘optional’ commands in there. I seem to remember some commands set toNULLtonotappear in the list of commands

Kevin Rue-Albrecht (06:19:28): > at the moment, we’ve been ‘stashing’ commands in there, but I guess a spring cleaning in there was only a matter of time

Charlotte Soneson (07:16:52): > Nicer looking heatmaps are now in thecowplotbranch

Aaron Lun (07:42:02): > cool

Aaron Lun (07:42:16): > From my end, I’ve spun out the brushing box.

Aaron Lun (07:42:27): > so changing the brush doesn’t cause a full re-evaluation of the plot.

Charlotte Soneson (07:42:37): > Nice! There is a weird thing happening with theselectizeInput(both for gene and annotation selection): the memory doesn’t seem to update when all genes (or annotations) are removed. Any idea why that would happen?

Aaron Lun (07:43:03): > A known issue. The observer will not respond to NULL inputs for selectize, which is what happens when you delete all inputs.

Charlotte Soneson (07:43:10): > Ah, ok

Aaron Lun (07:43:20): > This is a consequence of shiny’s happy-go-lucky way of indicating whether an input was specified or not.

Aaron Lun (07:43:38): > I can’t tell whether a NULL is because you deleted all genes, or whether it was because the input hasn’t been initialized yet, etc.

Aaron Lun (07:44:14): > If I don’t provide NULL protection, the plot will be rendered twice at start up.

Aaron Lun (07:44:49): > … which might not be so bad, as it would just flash with the “Invalid plot” message.

Aaron Lun (07:47:48): > @Kevin Rue-AlbrechtCan I also suggest displaying the % of points brushed as a UI element below each plot? This would avoid unnecessary re-evaluation.

Aaron Lun (07:49:54): > The brushing currentlyseemsmore responsive… though it’s hard to tell.

Aaron Lun (07:50:34): > Also, it doesn’t work for horizontal violin plots, as the brush box needs to be transposed and that information isn’t available at theiSEElevel.

Aaron Lun (07:51:37): > Is it possible to tell whethercoord_fliphas been run, by looking at theggplotobject?

Aaron Lun (07:59:22): > … and the answer is yes, with copious applications of dark magic.

Aaron Lun (07:59:38): > > is(gg$coordinates, "CoordFlip") >

Kevin Rue-Albrecht (08:52:31) (in thread): > Absolutely, i just thought that the plots were getting re-rendered anyway because of the brush being re-drawn. > However, if the brush is spun out, then it makes sense to spin out that info to a UI output

Kevin Rue-Albrecht (08:53:45): > lol. nice

Aaron Lun (08:58:11): > geom_pathdoesn’t seem to do anything.

Aaron Lun (08:59:31): > How do I draw some damn lines?

Kevin Rue-Albrecht (09:01:04): > well, not that I have used it much but as I understand it,geom_pathwants a data frame ordered from the first to the last point to connect, with x and y columns

Kevin Rue-Albrecht (09:01:18): > how do you have the data?

Aaron Lun (09:01:35): > yes, that’s how it’s set up.

Kevin Rue-Albrecht (09:01:41): > :confused:

Kevin Rue-Albrecht (09:02:27): > ```

Aaron Lun (09:02:30): > Ah, I know why. It’s because I set alpha =0

Aaron Lun (09:02:35): > copying from brushing box.

Kevin Rue-Albrecht (09:02:49): > Ah. You’re onto something there I think ^^

Aaron Lun (09:04:41): > Preliminary lasso support on “spinout”

Kevin Rue-Albrecht (09:05:02): > woooow, can’t wait to see that

Aaron Lun (09:05:27): > Currently you can’t close the lasso yet; and it does strange things if you try to brush at the same time.

Aaron Lun (09:06:19): > Also, double-clicking no longer seems to work…

Aaron Lun (09:06:23): > to zoom, I mean.

Aaron Lun (09:07:50): > Ah… I know why.

Kevin Rue-Albrecht (09:21:43): > I like how the lasso appears, in any case

Aaron Lun (09:23:02): > I’d like start and end dots, to help people figure out where they’re brushing from.

Kevin Rue-Albrecht (09:23:43): > hm, add aSizeBythat’s larger for the first point?

Kevin Rue-Albrecht (09:24:41): > Later we can add a ColorBy(PairedDarkColor)/FillBy(PairedLightColor) to emphasise it even more

Aaron Lun (09:25:08): > Filling might not be straightforward for complex polygons.

Kevin Rue-Albrecht (09:25:21): > sorry i meant filling the points

Aaron Lun (09:25:24): > oh

Aaron Lun (09:25:36): > In any case, I need to figure out how to avoid the brush and the click fighting each other.

Kevin Rue-Albrecht (09:25:41): > i’m making up a dummy data.frame right now for illustration

Aaron Lun (09:26:01): > Or you can just modify §plotting.R§

Kevin Rue-Albrecht (09:26:21): > if (!is.null(brush)){inactivePolygone<- TRUE}?

Kevin Rue-Albrecht (09:26:49): > this way people would have to clear the brush before they can lasso

Kevin Rue-Albrecht (09:27:13): > and if they brush, it clears the lasso

Aaron Lun (09:27:44): > Yes, we could do that.

Kevin Rue-Albrecht (09:28:11): > I can absolutely play with plotting.R, just let me know whenever you’re done with the prototype and I’ll fiddle with the aesthetic part

Aaron Lun (09:28:19): > Yes, please do.

Aaron Lun (09:28:31): > I will wonder off and think about how to get this to work.

Aaron Lun (09:33:12): > Hm. What about clicking anywhere outside the plotting area will close the lasso (if open) and will destroy the lasso (if closed).

Aaron Lun (09:33:41): > Sort of like those old shooting games where you have to shoot outside the screen to reload.

Aaron Lun (09:33:42): > TIME CRISIS.

Kevin Rue-Albrecht (09:34:34): > hahaha nice one too

Kevin Rue-Albrecht (09:34:51): > btw, I meant I can look at it this evening, not right now

Kevin Rue-Albrecht (09:37:05): > I took a minute to look at the code, and I can see where you add points, but I’d like to spend focused time on that to do things cleanly

Aaron Lun (09:41:13): > ok

Aaron Lun (09:48:06): > Hm… seems like clicking outside the plot area is a bit buggy.

Kevin Rue-Albrecht (10:04:32): > Finally got the dummy example right:

Kevin Rue-Albrecht (10:04:36): > > library(ggplot2) > library(RColorBrewer) > > display.brewer.all() > pairedColors <- brewer.pal(2, "Paired")[1:2] > > sizeScale <- c(4,1); names(sizeScale) <- c(TRUE, FALSE) > fillScale <- pairedColors; names(fillScale) <- c(TRUE, FALSE) > > df <- data.frame( > x = c(1,2,3,1), > y = c(1,2,2,1), > first = c(TRUE, rep(FALSE, 2), TRUE) > ) > ggplot(df, aes(x,y)) + > geom_path(colour = pairedColors[2]) + > geom_point(aes( > size = first, > fill = first), > stroke = 1, shape = 21, colour = pairedColors[2] > ) + > scale_size_manual(values = sizeScale) + > scale_fill_manual(values = fillScale) >

Kevin Rue-Albrecht (10:05:11): > now i just have to spend the time this evening to plug it into your lasso code

Aaron Lun (10:09:42): > I’d like something like a closed circle for the starting point of the lasso path, and an open circle for the current location.

Kevin Rue-Albrecht (10:10:16): > thanks, exactly the feedback i hoped for from this example

Kevin Rue-Albrecht (10:10:42): > although what do you call open/close?

Kevin Rue-Albrecht (10:11:10): > you mean the shape, or the fill?

Aaron Lun (10:11:14): > as in shape.

Aaron Lun (10:11:34): > Just something to indicate where the lasso begins (because you need to click the starting point to close the lasso)

Aaron Lun (10:11:44): > and something to indicate where you’re currently at (just in case you get lost).

Kevin Rue-Albrecht (10:12:07): > yep i know, i’m just trying to picture which shape exactly is an “open” circle

Aaron Lun (10:13:02): > Okay; lasso behaviour is now more-or-less stable.

Kevin Rue-Albrecht (10:13:31): > > max_shape <- 25 > plot(1:max_shape,rep(1,max_shape),pch = 1:max_shape,cex =2) >

Kevin Rue-Albrecht (10:13:50): > > please make your selection: > $ >

Aaron Lun (10:14:14): > Note that once you have a closed lasso, any further click will destroy it. And then the next click will start a new lasso.

Kevin Rue-Albrecht (10:14:29): > agreed

Aaron Lun (10:21:35): > And something visual to indicate that it’s closed would be nice. So maybe a change in the line style or something (from dashed to solid).

Aaron Lun (10:22:08): > Happy to usegeom_polygonas well, with the specifiedbrush_fill_color.

Kevin Rue-Albrecht (10:36:32): > hmm, yep, excellent idea the dash-to-solid transition

Kevin Rue-Albrecht (10:36:42): > easy to do, outside theaes

Aaron Lun (10:37:21): > I actually think the polygon would be nicer, mimics what happens with the brush a bit more.

Aaron Lun (10:37:32): > As in, only show the filling when the lasso is closed.

Kevin Rue-Albrecht (10:37:50): > ohhh, I get you

Kevin Rue-Albrecht (10:38:24): > so no need for the dash-solid transition (we can revisit that as a later bonus)

Kevin Rue-Albrecht (10:38:49): > oh my.. that’s gonna look good:slightly_smiling_face:

Aaron Lun (13:00:38): > There’s at least one problem; self brushing to restrict with lasso will not work unless we find a way to intersect polygons.

Aaron Lun (13:00:50): > Presumably there’s R functions to do that, so will have to dig into it.

Aaron Lun (13:01:29): > Also, tables won’t find it easy to receive lassos.

Aaron Lun (13:01:51): > We’ll have to create a dummy field*_Selected_*and fill it with TRUEs or FALSEs depending on whether it was selected or not.

Aaron Lun (13:02:01): > Though that’s an arguably better approach than what we’re doing now, anyway.

Aaron Lun (13:14:43): > Brushing by lasso is now supported from reduced dimension plots. It’s fairly easy to do this for every other plot, if someone wants too do it; I’m pretty tired now.

Kevin Rue-Albrecht (13:27:41): > i’m going to pull and look at it now. Good work anyways

Aaron Lun (13:29:01): > double click also clears the lasso if one is present. Otherwise it will zoom out.

Aaron Lun (13:30:19): > ALso note that mgcv::in.out uses a boundary crossing algorithm, which will give unintuitive (wrong?) results for complex polygons where the sides intersect. Though arguably any such cases are stupid and shouldn’t be specified.

Kevin Rue-Albrecht (13:31:02): > hm.. i wonder if there’s an easy way to clear polygons whose sides intersect

Aaron Lun (13:31:34): > What do you mean?

Kevin Rue-Albrecht (13:32:23): > detect when a polygon, even unfinished, has sides that intersect, and just clear the whole polygon as soon at this happens

Aaron Lun (13:32:39): > Probably not worth it.

Kevin Rue-Albrecht (13:32:47): > it’s probably over the top yeah

Kevin Rue-Albrecht (13:32:59): > especially if users can clear with dbl click

Kevin Rue-Albrecht (13:33:20): > we can’t always clear people’s mess

Kevin Rue-Albrecht (13:34:38): > … how precise did you set the lasso closing click?

Kevin Rue-Albrecht (13:35:19): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-02-16 18.35.07.png - File (PNG): Screenshot 2018-02-16 18.35.07.png

Kevin Rue-Albrecht (13:35:36): > or better asked, is there a way to control how relaxed it is?

Aaron Lun (13:35:50): > Yes.

Kevin Rue-Albrecht (13:36:26): > for example i had to add the last little bit of click here to finish up the lasso (although the first one was a bit inaccurate of me)

Kevin Rue-Albrecht (13:37:14): > anyway, don’t worry about it for now, it’ll become easier to decide once i add the open/closed circles with a certain diameter

Aaron Lun (14:03:19): > Currently it’s 2% of the plot range.

Aaron Lun (14:10:02): > I think we should just ban people from using restrict with a self-brush. This is, AFAICS, useless.

Aaron Lun (14:10:28): > Banning it would avoid us having to deal with intersecting polygons; not impossible, but an unnecessary pain.

Kevin Rue-Albrecht (14:11:16): > i can’t see a use for it either

Aaron Lun (14:12:36): > Because if you want to take the intersection, you can always draw a tighter box or lasso directly.

Aaron Lun (14:18:19): > Also, code tracking is completely FUBAR now due to changes in how the commands are arranged.

Kevin Rue-Albrecht (14:19:35): > i can imagine:confused:well we broke a few walls recently to experiment with stuff

Kevin Rue-Albrecht (14:20:11): > i’m getting near a prototype implementation of thegeom_pointcombo with lasso

Aaron Lun (14:21:27): > @Charlotte SonesonCowplot looks nice. Do we need a separate plot for categorical legends?

Aaron Lun (14:21:59): > Or for any legends, for that matter.

Charlotte Soneson (14:22:23): > Perhaps. So the legends are in the plots, and they can be extracted withcowplot::get_legend, but it requires that theggplotobject is saved.

Aaron Lun (14:23:19): > That’s fine, we have a cache for ggplots anyway. But I would suggest doing this after the spinout branch gets merged into heat.@Kevin Rue-Albrecht, feel free to do so after you clean up the aesthetics.

Aaron Lun (14:23:45): > I’m going home now. Am pretty pooped.

Kevin Rue-Albrecht (14:24:05): > @Kevin Rue-Albrechtuploaded a file:why nothing is drawn? - File (PNG): why nothing is drawn?

Kevin Rue-Albrecht (14:24:11): > i wanna be slapped -_-

Aaron Lun (14:24:19): > lol

Kevin Rue-Albrecht (14:25:48): > almost there :Warning: Error in parse: <text>:11:0: unexpected end of input

Kevin Rue-Albrecht (14:26:39): > something about the command that I wrote, anyway i’ll post again when i have good news ^^

Kevin Rue-Albrecht (14:42:21): > hmm ok.. I can get the command to work outside of Shiny if I prefix it withggplot() +, but there’s a typical ggplot error message otherwise > > Error in geom_path(aes(x = x, y = y), data = data.frame(x = c(0.468228548105303, : > non-numeric argument to binary operator >

Kevin Rue-Albrecht (14:45:15): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-02-16 19.40.33.png - File (PNG): Screenshot 2018-02-16 19.40.33.png

Kevin Rue-Albrecht (15:12:56): > Ok it’s working. One last rebuild for cleanup and I’ll push

Kevin Rue-Albrecht (15:14:23): > ilovethat lasso

Aaron Lun (15:15:48): > Are the points at the vertices necessary? These could make it difficult to figure out where the last point actually is, in complicated lassos.

Aaron Lun (15:16:23): > Also, you could consider using ageom_rectat the first point, to mark the area where you can click to close the lasso.

Kevin Rue-Albrecht (15:16:29): > i have downsized them

Kevin Rue-Albrecht (15:16:42): > (the intermediate ones)

Kevin Rue-Albrecht (15:17:21): > i see what you mean with the geom_rect, but why don’t you take what I just pushed for a test run

Aaron Lun (15:17:29): > Can’t, at home now.

Kevin Rue-Albrecht (15:17:39): > ok let me boot up and screensht

Kevin Rue-Albrecht (15:18:11): > the plot above isn’t representative of what the app looks like

Aaron Lun (15:18:55): > Also, the refactoring I did earlier means that you don’t need to deparse the lasso waypoints.

Kevin Rue-Albrecht (15:19:09): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-02-16 20.18.54.png - File (PNG): Screenshot 2018-02-16 20.18.54.png

Kevin Rue-Albrecht (15:19:28): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-02-16 20.19.15.png - File (PNG): Screenshot 2018-02-16 20.19.15.png

Kevin Rue-Albrecht (15:19:38): > ain’t it pretty?

Aaron Lun (15:19:54): > Yes.

Aaron Lun (15:20:02): > Switch togeom_polygonupon close?

Kevin Rue-Albrecht (15:20:18): > ’f course, next up

Kevin Rue-Albrecht (15:20:31): > just gotta get dinner with the lady, and i’m back on it

Aaron Lun (15:20:33) (in thread): > You only need to assume that aall_lassos[[plot_name]]matrix exists.

Aaron Lun (15:20:58): > Cool.

Aaron Lun (15:21:25) (in thread): > Check out how.create_plot()handles it, for example, when using it to select points for brushing.

Aaron Lun (17:32:48): > Wait. Hold on. Am I the only unmarried dude here?

Kevin Rue-Albrecht (17:33:16): > not married, moving that way though

Aaron Lun (17:34:30): > Well, I must be the only single here, then.

Aaron Lun (17:35:08): > outrageous

Aaron Lun (17:35:22): > And I didn’t even get any flowers from my secret admirers on wednesday

Kevin Rue-Albrecht (17:37:30): > well, the price of productivity: i’m only back on iSEE now, for a short bit. Dinner turned into Netflix time

Aaron Lun (17:38:40): > lol

Kevin Rue-Albrecht (17:39:45): > i’m removing thefillaesthetic now, as it had only a minor visual impact on brush dots, and to avoid possible conflicts with other more useful fills in the future

Kevin Rue-Albrecht (17:40:07): > i’m dotting the path while the brush is not finished

Kevin Rue-Albrecht (17:40:25): > and i’m using shape to mark the initial lasso point

Aaron Lun (17:40:59): > oh okay

Aaron Lun (17:41:17): > yeah, dotting the path while we’re going along is good

Kevin Rue-Albrecht (17:41:21): > i like your idea of square for the start and dots for the others

Aaron Lun (17:41:28): > makes it more enjoyable to put down waypoints

Kevin Rue-Albrecht (17:41:34): > exactly

Aaron Lun (17:41:39): > and will distract people from the non-instant responsiveness

Kevin Rue-Albrecht (17:42:17): > oh man that’s fun (even though i switch the shapes the wrong way around)

Kevin Rue-Albrecht (17:42:28): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-02-16 22.41.57.png - File (PNG): Screenshot 2018-02-16 22.41.57.png

Aaron Lun (17:43:19): > nice

Kevin Rue-Albrecht (17:43:28): > it’s distracting me alright

Aaron Lun (17:44:04): > You can usegeom_rectto match the size of the starting rectangle to the area in which clicking will close the lasso.

Kevin Rue-Albrecht (17:44:30): > true

Kevin Rue-Albrecht (17:44:31): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-02-16 22.44.13.png - File (PNG): Screenshot 2018-02-16 22.44.13.png

Aaron Lun (17:44:56): > can we get dense lines?

Aaron Lun (17:44:58): > denser

Kevin Rue-Albrecht (17:44:59): > but a ‘decently’ sized point seems a good enough approximation, no?

Aaron Lun (17:45:08): > Dunno.

Kevin Rue-Albrecht (17:45:14): > that’sdottedstyle, I candashit

Aaron Lun (17:45:17): > Okay

Aaron Lun (17:45:23): > Anyway, people might get misled

Aaron Lun (17:45:33): > Just like when you’re playing FPS

Kevin Rue-Albrecht (17:45:35): > it’s just that i’d like to avoid adding unecessary layers

Aaron Lun (17:45:39): > and the target box != the visual

Aaron Lun (17:45:52): > I’m shooting the damn thing but it’s not losing HP

Kevin Rue-Albrecht (17:49:13): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-02-16 22.49.01.png - File (PNG): Screenshot 2018-02-16 22.49.01.png

Kevin Rue-Albrecht (17:49:14): > more like this?

Kevin Rue-Albrecht (17:50:34): > full selection of linetypes available at:http://sape.inf.usi.ch/quick-reference/ggplot2/linetype

Aaron Lun (17:56:07): > Yeah, that’s better.

Aaron Lun (17:56:49): > Or “c”, perhaps.

Aaron Lun (17:57:01): > Your call

Kevin Rue-Albrecht (18:10:53): > what was the previous brush alpha?

Kevin Rue-Albrecht (18:11:12): > (to apply to the new polygon)

Kevin Rue-Albrecht (18:18:50): > hm..@Aaron Lun: i’ve written a new function.self_poygon_paththat returns the command to draw the closed polygon, but I can’t figure how to switch between this one and the lasso one on the condition ‘is_closed’ let’s say

Kevin Rue-Albrecht (18:20:32): > can i just push it and let you handle the switch, or is this something you can guide me through messages?

Aaron Lun (18:20:57): > you should be able to check it from the matrix of lasso waypoints

Aaron Lun (18:21:08): > > attr(mat, "closed") >

Aaron Lun (18:21:43): > You should have access to the waypoint matrix within the.self_laso_pathfunction, so I would keep everything in there.

Aaron Lun (18:22:02): > As for the alpha - the brush alpha isn’t specified by me, I think shiny does it under the hood.

Kevin Rue-Albrecht (18:22:02): > ahh i get you

Aaron Lun (18:22:12): > So just fiddle with it until you get something nice, I guess.

Kevin Rue-Albrecht (18:23:23): > cool thanks

Aaron Lun (18:24:53): > Make sure you protect against the NULL attribute, though; have a look at the .zoomClick observer for an example.

Kevin Rue-Albrecht (18:25:40): > like that?

Warning: Error in if: argument is of length zero

Kevin Rue-Albrecht (18:25:47): > :laughing:

Aaron Lun (18:25:57): > …yes.

Kevin Rue-Albrecht (18:26:38): > i was already building it when you sent the warning ^^

Kevin Rue-Albrecht (18:34:33): > is it better to only setattr(..) <- closed, or wouldn’t it make sense to also setattr(..) <- openwhen is not the case? or a logical, in fact?

Kevin Rue-Albrecht (18:35:05): > oh no wait

Kevin Rue-Albrecht (18:35:10): > i’m getting tired again

Kevin Rue-Albrecht (18:39:40): > ok, based on past experience, another two builds that include stupid typos, and I’ll have a working app

Kevin Rue-Albrecht (18:41:10): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-02-16 23.40.44.png - File (PNG): Screenshot 2018-02-16 23.40.44.png

Kevin Rue-Albrecht (18:41:17): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-02-16 23.40.52.png - File (PNG): Screenshot 2018-02-16 23.40.52.png

Kevin Rue-Albrecht (18:41:39): > it’s a bit weak alpha (0.1)

Kevin Rue-Albrecht (18:43:47): > alright ladies and gentlemen, I pushed

Kevin Rue-Albrecht (18:45:06): > We’ll have to refactor that soon, to be honest. Prototype code gets ugly fast:confused:

Aaron Lun (18:51:54): > I can barely see the alpha, TBH

Aaron Lun (18:52:12): > re attr open; the attributes get wiped upon rbind, and it was too much of a chore to keep on resetting it.

Aaron Lun (18:56:39): > In fact, I don’t think the brush rectangle has any alpha. So best to keep that to zero.

2018-02-17

Kevin Rue-Albrecht (04:34:02): > Btw. I didn’t post one last screenshot where I upped the alpha to 0.2 instead of 0.1. I can remove if we prefer

Kevin Rue-Albrecht (04:55:05): > ok i found where the brush box was alpha=0, applied the same to the polygon now

Kevin Rue-Albrecht (05:08:00): > hang on. no i don’t get it:.self_brush_boxdoes indeed producegeom_rectwithalpha=0, but visibly there is something with an alpha≠0 in the app, when brushing a rectangle

Kevin Rue-Albrecht (05:08:32): > I can’t see where that one is coming from: is this a Shiny thing beyond our control?

Kevin Rue-Albrecht (05:14:19): > yep. still don’t know where the bush_box alpha is coming from, but it seems to be a 0.2

Kevin Rue-Albrecht (05:39:16): > brush_fill_coloris my answer

Kevin Rue-Albrecht (05:41:01): > default shiny brushopacity = 0.25. damn i was close (?brushOpts)

Kevin Rue-Albrecht (06:03:14): > @Kevin Rue-Albrechtuploaded a file:ECM-2.pdf - File (PDF): ECM-2.pdf

Kevin Rue-Albrecht (06:03:25): > @Charlotte Sonesondoes this help our discussion from a few days ago?

Kevin Rue-Albrecht (06:04:24): > i’ve kinda mixed a bit functions, slots, and variable names, but it gives the gist i think?

Charlotte Soneson (06:08:55): > Yeah, I think so.

Kevin Rue-Albrecht (06:11:20): > although it’s still not completely accurate, indeed

Kevin Rue-Albrecht (06:24:01): > closer now

Kevin Rue-Albrecht (06:24:03): > @Kevin Rue-Albrechtuploaded a file:ECM-3.pdf - File (PDF): ECM-3.pdf

Kevin Rue-Albrecht (06:28:58): > i’ve got a few more figures to put together for another manuscript, but i’ll try to clean up this one further: more homogenous use of function_or_ slot names, “not defined?” as a condition to drill further into more general color maps, etc..

Aaron Lun (06:53:02): > Ugh. Why do you guys wake up so early on weekends.

Aaron Lun (06:53:26): > Anyway, I’ve realized that the opacity of the polygon probably shohuldn’t be set

Aaron Lun (06:53:33): > Because the brushing box doesn’t have any fill either.

Kevin Rue-Albrecht (06:53:40): > you can change it in one place for all brushes now

Kevin Rue-Albrecht (06:53:44): > constants.R

Kevin Rue-Albrecht (06:54:26): > not much of a choice waking up earlythisweekend: figures for manuscript, PPT for “genomics forum” next Thursday, and I still want to spare some time for iSEE

Aaron Lun (06:54:34): > lol

Charlotte Soneson (06:55:13): > What about the olympics?!?

Charlotte Soneson (06:55:21): > That’s why I was up early today:wink:

Aaron Lun (06:55:52): > I guess we don’t have much of a winter in australia, so I never bothered.

Kevin Rue-Albrecht (06:56:10): > well if there’s tri-hacka-thlon at the olympics, we could whip up a team I think

Charlotte Soneson (06:56:15): > No excuse, there are skiers from Tonga:slightly_smiling_face:

Charlotte Soneson (06:56:33): > Correction: skier

Aaron Lun (06:57:30): > Well, yeah, we send people, but it doesn’t really capture the imagination.

Aaron Lun (06:57:35): > Except for steve bradbury

Kevin Rue-Albrecht (08:40:39): > eh….https://neuroconductor.org?!

Kevin Rue-Albrecht (08:41:25): > although that page is fun:https://neuroconductor.org/dependency-graph

Aaron Lun (09:11:42): > WTF

Aaron Lun (09:11:53): > They couldn’t have just used Bioconductor?

Aaron Lun (09:11:54): > Weird.

Kevin Rue-Albrecht (09:13:21): > for a name like that, i was half-expecting some familiar names, but it seems they just leeched the popularity of BioC:confused:

Charlotte Soneson (09:13:54): > https://twitter.com/gringene_bio/status/950452400279642113 - Attachment (twitter): Attachment > @JayPykw @mikelove @StrictlyStat @bcaffo here we go [again]. > > What about Bioconductor? > What about ImageJ? https://pbs.twimg.com/media/DTCva74VAAAJnG9.jpg

Aaron Lun (10:08:35): > @Kevin Rue-Albrechtlegend pops up, can we kill it?

Kevin Rue-Albrecht (10:09:05): > when does it pop up?

Aaron Lun (10:09:12): > for the lasso

Aaron Lun (10:09:24): > let me just do some refactoring first, tho.

Kevin Rue-Albrecht (10:09:51): > + guides(fill="none",color="none")usually does the trick (fill or color are example here)

Kevin Rue-Albrecht (10:10:01): > give me the green light and i look at it

Aaron Lun (10:10:10): > Okay.

Aaron Lun (10:29:17): > Done, and the legend is also fixed.

Aaron Lun (10:29:25): > See if you can understand what’s happened.

Kevin Rue-Albrecht (10:29:29): > cool

Kevin Rue-Albrecht (10:29:41): > i’m scared:sweat_smile:

Aaron Lun (10:29:48): > Now there is no deparsing done within the commands themselves.

Aaron Lun (10:30:01): > But it requires us to deparse at the top of the code tracker… which I will do.

Kevin Rue-Albrecht (10:30:15): > Nice. I wasn’t sure how to address that one last night

Kevin Rue-Albrecht (10:40:18): > two more manuscript figures and i’m allowed to play with the other kids (on iSEE)

Aaron Lun (10:41:10): > God I thought you had kids as well

Kevin Rue-Albrecht (10:42:28): > nah.. one step at a time:sweat_smile:

Aaron Lun (10:55:57): > Code tracker is fixed.

Aaron Lun (10:56:27): > I think we need to add a point when the lasso starts, otherwise it’s a bit hard tot ell.

Aaron Lun (10:56:47): > I originally skipped it if it was <2 because I didn’t want to deal with problems when geom_path just gets a length 1 input.

Kevin Rue-Albrecht (10:57:08): > oh yeah, sorry it also crossed my mind

Kevin Rue-Albrecht (10:58:02): > i took the habit of rushing the first two waypoints to see sthg, but obviously we need something a bit more intuitive for users

Kevin Rue-Albrecht (10:59:12): > so basically: if nrow=1: a geom_point, if is_closed: a geom_polygon, else: a geom_path

Aaron Lun (10:59:45): > Yep

Aaron Lun (11:22:17): > Restricted brushing to self is now prohibited.

Kevin Rue-Albrecht (11:33:59): > you just make me think of all the things we’d have had to put in theNEWSif that was a released package or we even submitted to Bioc a couple of weeks ago ^^

Aaron Lun (11:47:30): > Brushing information now shows up in a separate UI element.

Aaron Lun (11:48:10): > Note that, for reasons I don’t understand, it still works correctly when the input$brush (but not the memory brush) is cleared by re-rendering. Not entirely sure why this is - I would have expected it to fail - but oh well.

Aaron Lun (11:49:25): > Or maybe not; perhaps only the visible brush gets cleared, and input$brush persists upon re-rendering. I hope this is the case, otherwise something funny is happening elsewhere.

Kevin Rue-Albrecht (11:59:16): > thanks for doing all that - i’m stuck digging up old code for the last figure over here - what do you mean by “it still works” ?

Kevin Rue-Albrecht (12:01:22): > “the brush gets cleared by re-rendering”: you mean it gets cleared visually, but not functionally? > ah hang on.. i’m getting the subtlety between input brush and memory brush

Kevin Rue-Albrecht (12:02:30): > darn i’m everytime time impressed how reactive the app is with this memory/caching system

Aaron Lun (12:30:20): > @Charlotte Sonesoninfrastructure for a legend plot is now available, seeiSEE.Randlegend_field.

Aaron Lun (12:30:49): > Once this is done, I suggest a merge back to master.

Aaron Lun (12:31:24): > Oh, infrastructure is currently living inspinout, so that needs to be merged back toheatfirst, and thenheatback tomaster.

Aaron Lun (12:31:58): > Can you guys brainstorm some options for (i) clustering, (ii) centering and (iii) colour scaling/capping?

Kevin Rue-Albrecht (12:33:07): > Alright, i’m done with my own stuff. god it took long. I’m catching up here.

Aaron Lun (12:36:31): > Clustering is probably not that important (yet), but centering and colour scaling/capping would probably be critical for any usability.

Kevin Rue-Albrecht (12:36:31): > what’s missing to mergespinouttomaster?

Aaron Lun (12:36:43): > Well,heattomasteris missing a few things.

Kevin Rue-Albrecht (12:36:56): > oh sorryspinouttoheat

Aaron Lun (12:37:01): > Nothing.

Aaron Lun (12:37:09): > Except the initial dot for the lasso

Kevin Rue-Albrecht (12:38:00): > @Kevin Rue-Albrechtuploaded a file:Pasted image at 2018-02-17, 5:37 PM - File (PNG): Pasted image at 2018-02-17, 5:37 PM

Aaron Lun (12:43:49): > Centered heatmaps only have one logical colour scale; [some dark color] -> [some light color at zero] -> [some other dark color]

Aaron Lun (12:44:10): > If they’re not centered, you can of course use the assayCOlorMap.

Aaron Lun (12:44:18): > But if they are centered, we’d probably need to limit their choices

Aaron Lun (12:44:34): > As the asssay color map probably won’t make much sense.

Kevin Rue-Albrecht (12:44:39): > light at the centre? I tend to use purple-black-yellow these days, for row-scaled heat maps

Aaron Lun (12:44:43): > Really?

Aaron Lun (12:44:52): > Well, okay.

Aaron Lun (12:44:55): > But black at zero, right?

Aaron Lun (12:45:01): > Otherwise it would be impossible to interpret.

Kevin Rue-Albrecht (12:45:35): > although I’ve come across some Vogel paper with pale colors at the center, let me dig that up

Kevin Rue-Albrecht (12:45:57): > yes, i meant black at zero (or your light color)

Kevin Rue-Albrecht (12:47:05): > @Kevin Rue-Albrechtuploaded a file:Vogel-style - File (PNG): Vogel-style

Aaron Lun (12:47:18): > That’s okay too.

Aaron Lun (12:47:44): > In any case, we need another panel box with heatmap-specific colour options.

Kevin Rue-Albrecht (12:48:37): > @Kevin Rue-Albrechtuploaded a file:Kevin recent - File (PNG): Kevin recent

Kevin Rue-Albrecht (12:48:49): > that’s something I’ve done recently

Aaron Lun (12:48:51): > The purple’s a bit hard on the eyes.

Aaron Lun (12:49:10): > Looks more realistic, though.

Kevin Rue-Albrecht (12:49:11): > yup, I think it’s"purple"in the pureRmeaning

Aaron Lun (12:49:21): > As in, from a microarray chip.

Kevin Rue-Albrecht (12:49:33): > i’m sure sure we can soften the color tone a bit

Aaron Lun (12:49:47): > Well, in any case, we need a heatmap color box with checkboxes for centering and scaling

Aaron Lun (12:49:53): > and something to limit the maximum range

Kevin Rue-Albrecht (12:50:16): > yup. which reminds me: > 1) we can probably quantile-crop the range

Aaron Lun (12:50:27): > Or we can go one better

Aaron Lun (12:50:32): > and useupdateSliderInput

Kevin Rue-Albrecht (12:50:33): > like trim the lower/top 10%

Aaron Lun (12:50:36): > whenever anyone changes the heatmap

Kevin Rue-Albrecht (12:50:36): > oh yeah

Kevin Rue-Albrecht (12:51:41): > while you mention microarrays, there’s always the green-black-red style

Aaron Lun (12:52:00): > Not good for colour blind people.

Kevin Rue-Albrecht (12:52:20): > ahh that’s why it died out

Aaron Lun (12:52:46): > anyway, I need to review something, so will not be responsive for a bit.

Kevin Rue-Albrecht (12:53:09): > ok, i’m adding the single-dot lasso thing, and then i merge back toheat

Aaron Lun (12:53:38): > Okay. See how far you can get with the heatmap UI.

Kevin Rue-Albrecht (12:54:33): > still need to get familiar with it; i kinda followed theheatdevelopment from a distance this week

Aaron Lun (12:54:57): > Sure. Once it’s done happy to merge back to master

Aaron Lun (12:55:07): > and then the gruelling task of re-testing everything begins.

Kevin Rue-Albrecht (12:55:43): > yeah.. i’m not really looking forward, but it’ll be good to go through that exercise anyway

Aaron Lun (12:56:55): > Well, that’s why they pay me the medium bucks.

Kevin Rue-Albrecht (12:58:23): > not sure whether to interpret that as more than small bucks or less than large bucks ^^

Kevin Rue-Albrecht (13:13:55): > @Kevin Rue-Albrechtuploaded a file:t’was a long day.. - File (PNG): t’was a long day..

Aaron Lun (13:14:07): > lol

Kevin Rue-Albrecht (13:14:36): > not sure I’m glad that R foundshape=1.5

Kevin Rue-Albrecht (13:14:50): > sometimes i long for error/warning messages

Kevin Rue-Albrecht (13:16:03): > alright, time to drop all themessage/printdebugs, and I push

Kevin Rue-Albrecht (13:20:29): > where should lasso constants go? (startShape, startSize, etc.)

Kevin Rue-Albrecht (13:20:44): > I’ve hard-coded them in a few places, and I’d like to refactor that out

Kevin Rue-Albrecht (13:20:58): > constantsorplotting?

Aaron Lun (13:24:36): > plottingunless they affect many things across files in which caseconstants.

Kevin Rue-Albrecht (13:25:22): > ok, plotting it is then

Kevin Rue-Albrecht (13:31:30): > ok that’s pushed now

Kevin Rue-Albrecht (13:31:53): > i just noticed: double-click doesn’t seem to zoom out anymore, known bug?

Aaron Lun (13:33:31): > It should zoom out only if ther’es no lasso.

Aaron Lun (13:33:40): > First double click should clear the lasso.

Aaron Lun (13:33:45): > Next double click will zoom out.

Aaron Lun (13:33:47): > I think.

Kevin Rue-Albrecht (13:34:02): > let me try again, but i think i trieda lotof double clicks

Kevin Rue-Albrecht (13:34:45): > oh, seems like i didn’t do it properly: it just worked now

Kevin Rue-Albrecht (13:34:57): > yep - sorry

Aaron Lun (13:34:57): > Good

Kevin Rue-Albrecht (13:35:10): > i’ll merge now as soon as CI completes then

Kevin Rue-Albrecht (13:37:48): > it’s really weird: new session and it doesn’t work anymore, neither redDimPlot nor colDataPlot

Aaron Lun (13:38:01): > ?

Aaron Lun (13:38:04): > The CI?

Kevin Rue-Albrecht (13:38:15): > the dlb-click to zoom out

Kevin Rue-Albrecht (13:38:46): > my only way to reset the plots is to change the XY plotting parameters

Kevin Rue-Albrecht (13:39:01): > or the color parameters

Kevin Rue-Albrecht (13:39:23): > looks like there’s a replotting that doesn’t trigger in certain conditions then

Aaron Lun (13:39:47): > hold on

Aaron Lun (13:42:10): > Also, the initial lasso point is being created even when brushing - this shouldn’t be possible.

Kevin Rue-Albrecht (13:42:29): > yes, that too

Kevin Rue-Albrecht (13:43:20): > it gets cleared visually, but i guess the fact that it appears at all highlights a problem somewhere

Kevin Rue-Albrecht (13:44:03): > btw, i don’t how, but for a few moment, in the same session, I managed to get the zoom-out feature again… and then lost it again

Kevin Rue-Albrecht (13:45:51): > oh wait a sec, maybe I know where that comes from

Kevin Rue-Albrecht (13:47:07): > I may have relaxed a bit too much the condition to draw the lasso:innocent:

Aaron Lun (13:47:36): > How so?

Kevin Rue-Albrecht (13:48:04): > if (is.null(current) || nrow(current) < 2L) {->if (is.null(current) {

Aaron Lun (13:48:24): > Well, that shouldn’t affect the upstream observers.

Kevin Rue-Albrecht (13:48:40): > < 1Lwould have been a smarter condition

Kevin Rue-Albrecht (13:49:43): > ah.. yep you’re right.. the lasso point still gets drawn with the brush box

Aaron Lun (13:50:05): > Well, I vaguely understand the cause of the zoom.

Kevin Rue-Albrecht (13:53:37): > meanwhile, i found a way to prevent the lasso-start to show on top of the brush box

Aaron Lun (13:53:46): > Zoom is fixed.

Kevin Rue-Albrecht (13:53:48): > who draws first?

Kevin Rue-Albrecht (13:53:49): > ah

Kevin Rue-Albrecht (13:53:52): > :dizzy_face:

Aaron Lun (13:54:41): > I’m curious to how the waypoints even exist.

Aaron Lun (13:54:50): > You shouldn’t need to intercept it at your level.

Kevin Rue-Albrecht (13:55:36): > not the waypoints, only the first one

Kevin Rue-Albrecht (13:56:02): > it seems that the click used to draw the box is captured as a lasso first point

Aaron Lun (13:56:16): > even so, once brushing starts, it should destroy any existing way points.

Aaron Lun (13:56:27): > And it doesn’t make sense for brushing to start before the click.

Aaron Lun (13:56:54): > This is an observer problem.

Kevin Rue-Albrecht (13:57:01): > well.. except if “click” is only registered as a “KeyUp” event

Aaron Lun (13:57:21): > Don’t understand.

Kevin Rue-Albrecht (13:57:22): > (rather than a “KeyDown”)

Aaron Lun (13:57:26): > Oh right

Aaron Lun (13:57:29): > Possibly.

Aaron Lun (13:57:56): > Hm…

Aaron Lun (13:58:02): > Will think about this as I take a toilet break.

Kevin Rue-Albrecht (13:58:17): > then, while brush and click start together, brush may take priority when the click-up event happens, for whatever reason

Kevin Rue-Albrecht (13:59:33): > in any case, I can catch the issue at the lasso-drawing step: “do not draw the lasso start point if.brushDatais notNULL

Aaron Lun (14:02:03): > hold on.

Aaron Lun (14:02:17): > let me try something upstream.

Aaron Lun (14:02:33): > Because this is a more fundamental issue; lasso waypoints and brush data should not coexist in memory.

Aaron Lun (14:08:55): > Well, I think I fixed it, but the order is still unclear to me.

Aaron Lun (14:09:10): > Say you have an existing brush. When a click event triggers, does the brush get removed first, or does the click observer trigger first?

Aaron Lun (14:16:44): > Okay, that should do it.

Aaron Lun (14:17:23): > Now the memory should always be valid (lasso and brush data should never co-exist)

Aaron Lun (14:17:44): > The only possibility is in between updates where the app is temporarily invalid, but your change to plotting should ensure that a lasso is never plotting with a brush.

Kevin Rue-Albrecht (14:30:23): > Ok, neat. I don’t know what the answer to your theoretical click event question is though.

Aaron Lun (14:31:32): > Does anybody?

Aaron Lun (14:31:41): > Anyway, it was a shame that my time crisis idea didn’t work.

Aaron Lun (14:31:58): > The events linked to double-click are now a bit too complicated.

Aaron Lun (14:32:17): > The others are fairly easy; brush kills lasso and lasso kills brush.

Kevin Rue-Albrecht (14:32:21): > so i wait that you push your fix and then we merge back toheat?

Aaron Lun (14:32:26): > Should be pushed now.

Aaron Lun (14:32:52): > Yep. See if you’re up for some heat UI.

Aaron Lun (14:33:01): > Okay, I really need to gett back to reviewing this.

Kevin Rue-Albrecht (14:35:02): > Ok no worries. I see Travis working now. To be fair I think i’ll take a break for the evening, and get back to that tomorrow, after I get a bit of PPT done for my talk Thursday. Still need to figure out a viable topic

Aaron Lun (14:38:41): > Just talk about Heatmaps and UI elements for them.

Aaron Lun (14:38:50): > I talked about matrices in my lab talk.

Aaron Lun (14:39:00): > Thought about doing it for my institute as well.

Aaron Lun (14:39:04): > Dressed up as Neo or something.

Aaron Lun (14:39:11): > I could also do trinity, but probably a bit too tight.

Kevin Rue-Albrecht (14:40:15): > hahaha.. nah, I appreciate the offer, but Steve set that “Genomics Forum” up for people in the Kennedy institute to present work in progress on ’omics projects

Kevin Rue-Albrecht (14:41:13): > but you remind me of a guy (different type of seminars) who had an introduction in the pureMatrixstyle, with a title about something “Reloaded”

Kevin Rue-Albrecht (14:41:25): > i think image analysis

Aaron Lun (14:43:17): > lol

Aaron Lun (14:57:39): > Probably worth adding lasso support to all the dot-related plots, if you have the time to do that.

Aaron Lun (14:57:43): > Just setclick=

Aaron Lun (15:01:50): > Going home now, am pooped.

Kevin Rue-Albrecht (17:07:47): > ok.. took me a bit of time, but I finally found whereclick=needed to be added:sweat_smile:

Kevin Rue-Albrecht (17:35:55): > alright.. i’ve been playing with it for a bit, but will sleep on it: lasso is enabled on all plots of types if scatter plots

Kevin Rue-Albrecht (17:36:23): > anything categorical breaks the brush, i’ll go dream the fix

Kevin Rue-Albrecht (17:37:05): > PS: i’ve got a strong feeling it’s something to do with coercing factors to integer

Kevin Rue-Albrecht (17:54:33): > alright, no one sweats it: i found the fix

Kevin Rue-Albrecht (17:57:19): > hm.. violin plots covered. For some reason my fix doesn’t cover griddotplot, even though I thought it would

Kevin Rue-Albrecht (18:24:05): > argh.. i can’t find the solution even though i’ve identified the issue: > basically,.process_brushby_choiceneeds to know whether each of X/Y are grouped or not in thesenderplot, so that their numeric representation (used for plotting) can becbind-ed into a matrix fed tomgcv::in.outto evaluate the brush. > As a consequence, the new argumentsgroupX, groupYthat I’ve just added to.process_brushby_choiceare completely useless, as they refer to the groupability of X/Y in thereceiverplot

Kevin Rue-Albrecht (18:27:10): > with that, I’m definitely off to bed, sorry to leave a bit of a mess behind tonight

Aaron Lun (19:53:47): > It should work off the bat, just likebrushedPointsworks off the bat.

2018-02-18

Kevin Rue-Albrecht (04:14:13): > Well I guess something bad is happening when we make that matrix

Kevin Rue-Albrecht (05:16:58): > yeah i think i got it now

Kevin Rue-Albrecht (05:17:45): > > df <- data.frame( > x = sample(letters[1:5], 100, TRUE), > y = rnorm(100) > ) > df.matrix <- as.matrix(df) > # df$x is a factor > # df.matrix is a character matrix >

Kevin Rue-Albrecht (05:19:47): > > library(ggplot2) > library(mgcv) > > df <- data.frame( > x = sample(letters[1:5], 100, TRUE), > y = rnorm(100) > ) > > ggplot(df, aes(x,y)) + geom_violin() + geom_jitter(width = 0.1, height = 0) > > lassoPoints <- matrix( # suited me to lasso 4 points for QC > c( > 3.5, 0, > 4.5, 0, > 4.5, 1, > 3.5, 1 > ), ncol = 2, byrow = TRUE, dimnames = list(NULL, c("x", "y")) > ) > > ggplot(df, aes(x,y)) + geom_violin() + geom_jitter(width = 0.1, height = 0) + > geom_polygon(aes(x, y), as.data.frame(lassoPoints), alpha = 0.2) > > in.out(lassoPoints, as.matrix(df)) # problem > > df.matrix <- as.matrix(df) # demonstrate character matrix issue > > df.matrix <- as.matrix(data.frame( # make numeric matrix > x = as.numeric(df$x), > y = df$y > )) > > in.out(lassoPoints, df.matrix) # works > table(in.out(lassoPoints, df.matrix)) >

Kevin Rue-Albrecht (05:54:11): > i’ve pushed a quick fix that fails only for horizontal violins and griddotplots

Kevin Rue-Albrecht (05:54:33): > (for some reason, itdoeswork for griddotplots of a single level

Aaron Lun (06:52:58): > Have a look at whatshiny:::asNumberdoes.

Aaron Lun (06:53:26): > You’ll need toas.numeric(df$y)as well.

Kevin Rue-Albrecht (07:06:32): > i’ve done the latter in my latest push

Kevin Rue-Albrecht (07:07:52): > (without more success)

Kevin Rue-Albrecht (07:08:31): > actually, i wonder if it’s something to do withcoord_flip, i’ve lost a bit track of when coords are transformed or not, tbh

Kevin Rue-Albrecht (07:09:07): > but i wonder if it’s possible that a flipped lasso is applied to unflipped data, or vice versa

Aaron Lun (07:09:29): > that’s possible.

Kevin Rue-Albrecht (07:10:05): > going out for a bit though

Kevin Rue-Albrecht (07:10:10): > catch up later

Aaron Lun (08:36:12): > Well, looks like I need to put a “flipped” indicator in the matrix as well;in.outneeds the flipped coordinates, but the point plotters need the original coordinates.

Aaron Lun (08:52:34): > Should be fixed.

Aaron Lun (09:23:39): > Also fixed issues with lasso clearing upon plot updates.

Kevin Rue-Albrecht (09:23:47): > I just realised: you’re working onspinoutagain

Kevin Rue-Albrecht (09:24:17): > I was looking atheatto checkout your changes:sweat_smile:

Aaron Lun (09:24:20): > oh forgot it was merged

Kevin Rue-Albrecht (09:25:08): > mah, it’s actually not a bad thing, and easy to merge again

Aaron Lun (09:25:12): > well don’t do anything let me merge it.

Kevin Rue-Albrecht (09:25:34): > i’m not doing much this afternoon - trying to get started on my PPT

Kevin Rue-Albrecht (09:38:14): > just from a quick test run, horizontal violins seem ok, but griddotplot with multiple levels still cause the error:Warning: Error in mgcv::in.out: NA/NaN/Inf in foreign function call (arg 4)

Kevin Rue-Albrecht (09:40:05): > I’m guessing it has to do with > > .C(C_in_out, bx = as.double(bnd[, 1]), by = as.double(bnd[, > 2]), break.code = as.double(lowLim), x = as.double(x[, > 1]), y = as.double(x[, 2]), inside = as.integer(x[, 2] * > 0), nb = as.integer(n), n = as.integer(nrow(x))) > > inmgcv::in.out

Kevin Rue-Albrecht (09:40:20): > arg 4 isx = as.double(x[,1])

Kevin Rue-Albrecht (09:40:50): > maybe I shouldas.doublerather thanas.numeric

Aaron Lun (09:40:52): > probably need as.double(as.factor(…))

Aaron Lun (09:41:22): > Though I would have thought that we coerced it properly to a factor in the original construction ofplot.data

Kevin Rue-Albrecht (09:41:40): > yeah. i’m a bit puzzled too, not that Ias.doublevery often

Aaron Lun (09:42:16): > works fine for me.

Aaron Lun (09:42:46): > but not for dual grid plots

Aaron Lun (09:42:57): > We must be missing a coercion on one of the axes.

Kevin Rue-Albrecht (09:43:00): > ah you worried me that I missed a commit

Kevin Rue-Albrecht (09:43:22): > well, maybe justmessage(cmd)to check that out

Kevin Rue-Albrecht (09:44:28): > I wish I could spot those issues from the code itself, but it’s getting increasingly hard/convoluted/self-aware, that I’m falling back onmessageandprintincreasingly often:sweat_smile:

Kevin Rue-Albrecht (09:45:06): > “DeariSEE, tell me what you see here”

Aaron Lun (09:47:26): > coercion is definitely happening….

Kevin Rue-Albrecht (09:48:26): > @Kevin Rue-Albrechtuploaded a file:Screenshot 2018-02-18 14.48.10.png - File (PNG): Screenshot 2018-02-18 14.48.10.png

Kevin Rue-Albrecht (09:48:50): > I knew Google would like to weigh in on this one:wink:

Aaron Lun (09:51:26): > Well, now it’s working okay…

Kevin Rue-Albrecht (09:51:39): > eh.. what did you change then>

Kevin Rue-Albrecht (09:51:54): > (although I can check out the diff:sweat_smile:)

Aaron Lun (09:52:08): > Nothing from the currentheat.

Kevin Rue-Albrecht (09:52:36): > mhh. i’m up-to-date.. let me try again

Aaron Lun (09:54:24): > yep, looks functional to me, after re-installing and restarting R.

Aaron Lun (09:55:40): > though occasionally I get “argument is of length zero” in.process_brushby_choice

Kevin Rue-Albrecht (09:56:09): > I’ll try that now then. In the meantime, here’s my failing use case: > - reddimPlot receives from colDataPlot > - colDataPlot: x=Core.Type, y=driver_1_s > - lasso the smallest group of point (bottom right intersection) > -Warning: Error in mgcv::in.out: NA/NaN/Inf in foreign function call (arg 4)shows for redDimPlot

Aaron Lun (09:57:14): > Not an issue with the x=dissection_s.

Aaron Lun (09:57:22): > So it must be because there are actually NAs in CoretType.

Kevin Rue-Albrecht (09:57:35): > ohhhh… yeah i think you’re right

Kevin Rue-Albrecht (09:57:57): > damn.. soas.doubleprobably doesn’t deal well withNAs

Aaron Lun (09:58:24): > well, it would just report more NAs.

Kevin Rue-Albrecht (09:58:40): > ah. somgcv::in.outthen ?

Kevin Rue-Albrecht (09:59:40): > i expect we should just exclude points withNAvalues in X/Y from what is passed tomgcv::in.out

Aaron Lun (09:59:54): > yes

Kevin Rue-Albrecht (10:01:29): > ok. what’s the status about branches/commit at the moment? do you have commits awaiting push somewhere?

Aaron Lun (10:08:45): > That should have fixed it.

Kevin Rue-Albrecht (10:12:10): > nice, thanks

Aaron Lun (10:46:30): > Well, the heatmap UI is fully done. Waiting for integration with heatmap plotting. Nag to@Charlotte Soneson.

Kevin Rue-Albrecht (10:51:14): > Cool. I’ll have to think about the dual use ofscale_sizethat conflicts between the lasso path and the boxes of the griddotplot though:Scale for 'size' is already present. Adding another scale for 'size', which will replace the existing scale.

Kevin Rue-Albrecht (10:57:25): > although for some reason, the boxes still look unaffected by the ‘replaced scale’

Aaron Lun (10:57:35): > ¯*(ツ)*/¯

Aaron Lun (10:57:43): > Ggplot. Can’t live with it, can’t live without it.

Kevin Rue-Albrecht (10:59:07): > I’ll do a couple of hours of pptx, and look back at it if I can think of something better. I kinda like the different point size for the start/waypoints, but maybe i can find shapes that do the same effect without the scale

Aaron Lun (12:03:50): > Brushing inputs into row stat tables are fixed.

Kevin Rue-Albrecht (12:04:41): > glad to see there’s no stopping you:slightly_smiling_face:

Kevin Rue-Albrecht (12:06:03): > i’m dying in the middle of reviews, screenshotting left and right to build a measure of background to my presentation:sleepy:

Aaron Lun (12:06:15): > Reviews?

Aaron Lun (12:06:21): > Lol

Kevin Rue-Albrecht (12:06:47): > thymic epithelial cells, John will know if you ask him:wink:

Aaron Lun (12:06:59): > Yes, I was talking to mike morgan about this on Friday

Kevin Rue-Albrecht (12:07:52): > right, it’s a small world/office indeed

Kevin Rue-Albrecht (12:08:31): > oh yeah, by reviews, i meant published ones that I’m shamelessly stealing from

Kevin Rue-Albrecht (12:08:50): > not reviewing anything myself these days, thank god

Kevin Rue-Albrecht (12:09:31): > that would take my last time slot (4-5am) away:stuck_out_tongue:

Aaron Lun (12:09:36): > lol

Charlotte Soneson (12:11:33): > What was your idea with the Lower/Upper values for the heatmap colors? To cap the colors (but keep the original values in the matrix/colorbar) or to cap the values in the matrix?

Kevin Rue-Albrecht (12:12:21): > I think the end result would be the same, but I’d rather cap the color scale

Aaron Lun (12:12:26): > Agreed.

Charlotte Soneson (12:13:14): > The heatmap would look the same, but not the color bar

Kevin Rue-Albrecht (12:14:29): > hm yes, capping the matrix would pretty rather bad: the color bar would not have any chance to show the true range of data

Kevin Rue-Albrecht (12:15:16): > rather, I’d rather cap the color bar, as in: any thing beyond the cap is the same color

Aaron Lun (12:15:18): > The color bar capping is fine.

Aaron Lun (12:15:21): > Yes.

Aaron Lun (12:15:46): > Otherwise if you have one gene that is expressed 100-fold higher in one small population, everything else will llook white

Aaron Lun (12:15:50): > or black, depending on your colour scale

Kevin Rue-Albrecht (12:15:58): > can’t remember the exact code right, but i think setting breaks in the right places should do the trick

Kevin Rue-Albrecht (12:16:52): > repeating the extreme colors twice at each end, once at the cap, then at the max value

Kevin Rue-Albrecht (12:17:18): > and setting breaks evenly within the uncapped range

Kevin Rue-Albrecht (12:17:57): > (i’m trying to think whether there’s a built-in, smarter way, to set caps)

Aaron Lun (12:18:49): > Well, if you’re not clustering, the caps won’t make a difference.

Aaron Lun (12:19:00): > And if you are clustering, then it’s pretty simple; just cluster on the uncapped data first.

Aaron Lun (12:19:29): > The “suggest feature order” button doesn’t have any observers attached to it yet, tho.

Kevin Rue-Albrecht (12:20:08): > indeed, but irrespective of clustering, I was just trying to draw out an implementation plan for the capped color scale

Charlotte Soneson (13:19:33): > Is there a reason that capping is only available for unscaled data?

Aaron Lun (13:21:04): > Is there a need to cap for dynamic range when you’re scaling as well?

Aaron Lun (13:21:25): > Seems a bit complicated, as you would have to cap before scaling.

Charlotte Soneson (13:22:18): > But wasn’t the idea to just cap the color scale? And keep the original values? I can imagine that values can get pretty large after scaling (if the sd is low).

Aaron Lun (13:23:42): > Yes, but how are you interpreting the cap values after scaling?

Charlotte Soneson (13:24:00): > As z-score limits above which the color stays the same

Aaron Lun (13:24:10): > MMmmm…

Charlotte Soneson (13:24:12): > Maybe I’m still not getting the idea

Aaron Lun (13:24:25): > Well I guess you could do that.

Kevin Rue-Albrecht (13:25:12): > I think I’m with Charlotte on this one. Even when I rowscale, I sometimes cap out those annoying outliers

Charlotte Soneson (13:25:24): > I would think that the default (-5,5) would be a stranger default for capping uncentered,unscaled data (which will typically be positive)

Aaron Lun (13:25:58): > Yes, that’s why the default is to center and not scale.

Kevin Rue-Albrecht (13:26:07): > however, I don’t have a written recipe for that, it’s kind of a case by case call, which value I cap

Aaron Lun (13:27:19): > Plotting uncentered data is a bit silly to me, though.

Aaron Lun (13:27:58): > Anyway, just bust out the textInputs from the .conditionalPanelOnRadio, and you can hvae access to the limits when you’re scaling.

Aaron Lun (13:28:31): > For uncentered data - if anyone would want it - just use the assayColorMap.

Aaron Lun (13:28:46): > Otherwise, we’ll have to supply custom color maps where zero is white/black/some neutral color.

Aaron Lun (13:28:53): > with enforced symmetry, etc.

Charlotte Soneson (13:29:09): > So no capping available for uncentered data at all then.

Charlotte Soneson (13:29:43): > And available for centered data regardless of scaling. I think that would make sense

Aaron Lun (13:29:50): > you can still cap for uncentered data.

Aaron Lun (13:31:02): > Though arguably we’d need to run anupdateTextInputto give sensible defaults when centering is turned off.

Charlotte Soneson (13:31:07): > Yes

Aaron Lun (13:31:46): > Though we would probably have to do that anyway… Anyway, just implement your stuff first.

Aaron Lun (13:32:51): > As in, whenever the plot parameters change (i.e., change to assay or input genes), we should runupdateTextInput

Aaron Lun (13:34:36): > Or better - if it’s set to Inf/-Inf, don’t do any capping. This should probably be the default.

Aaron Lun (13:35:33): > However, if it does get specified, the boundaries of the colour scale need to stretch to the specified bounds, even if the colours are well within the limits.

Aaron Lun (14:16:44): > Belting out some REO speedwagon

Aaron Lun (14:16:49): > and annoying the others in the office.

Kevin Rue-Albrecht (14:18:41): > careful when theycan’t fight this feeling anymore^^

Aaron Lun (14:19:41): > lol

Charlotte Soneson (14:52:51): > I just pushed an update that centers, scales, sets the color scale and shows the legend plots. Need to think a bit more about how to best include the capping.

Kevin Rue-Albrecht (14:54:14): > nice one, i’ll check that out now, to start thinking where I can help

Aaron Lun (16:23:20): > BTW, thinking of submitting to BioC at the end of the month. I think that’s a good deadline to motivate people; we just need to brush up the tests and documentation.

Aaron Lun (16:23:55): > Also, finally vacuumed my room! At last, I can sit in my room without getting bitten by something.

Kevin Rue-Albrecht (16:29:11): > hahaha

Kevin Rue-Albrecht (16:31:47): > Alright, end of the month.. should be possible with one more weekend within that time

Aaron Lun (16:32:05): > TBH, something is still biting me… but with a lot less intensity, so I’ll call it a win.

Kevin Rue-Albrecht (18:08:28): > fixing XAxis selection for featExprsPlot when linked to a rowStatTable

Kevin Rue-Albrecht (18:08:56): > i think it’s looking for the gene index e.g.1inrownames

Aaron Lun (18:46:51): > Yes, I had noticed this but hadn’t gotten around to dealing with it.

Kevin Rue-Albrecht (19:08:12): > solved

Kevin Rue-Albrecht (19:08:21): > anyone still around?

Kevin Rue-Albrecht (19:11:11): > I got a fun one on branchCyTOFnow

Kevin Rue-Albrecht (19:11:56): > it’s not an exported function, so you’ll have to play withiSEE:::CyTOF(sce, 4)for example

Kevin Rue-Albrecht (19:13:41): > also, I’ve checked and updated tests inconstants,defaults,ECM, andplotting

Kevin Rue-Albrecht (19:14:11): > I think it’stest_brush_linksthat needs most an update next

Kevin Rue-Albrecht (19:14:30): > Going to sleep now.

2018-02-19

Kevin Rue-Albrecht (04:09:19): > just crossed my mind: tonight i’ll go through parts of the vignette that I can fix up, if I remember well some code chunks got outdated recently

Kevin Rue-Albrecht (04:55:13) (in thread): > @Charlotte Soneson, I’m about to play again with the CyTOF example in the vignette > I’d be curious to hear your opinion whenever you have time

Charlotte Soneson (04:57:31) (in thread): > Ok. I’ll check theCyTOFfunction now

Kevin Rue-Albrecht (04:58:46) (in thread): > Thanks. > Thefeaturesargument is still a rough clunky implementation (single character vector, that lists features for axes in the order y1, x1, y2, x2, …)

Kevin Rue-Albrecht (04:59:46) (in thread): > but the main point a the moment is then_linkedargument that initialises the app with that many featExprsPlot already (linearly) chained together

Charlotte Soneson (05:01:30) (in thread): > Just checked outCyTOF,mode_CyTOF()complains about missingn_featExprPlot

Kevin Rue-Albrecht (05:01:42) (in thread): > arff

Kevin Rue-Albrecht (05:02:16) (in thread): > I must have changed it after I commited

Charlotte Soneson (05:02:17) (in thread): > You have a more recent version locally?

Kevin Rue-Albrecht (05:02:52) (in thread): > I can see the erroneous code in my local version too

Kevin Rue-Albrecht (05:03:00) (in thread): > i know what’s wrong though

Kevin Rue-Albrecht (05:03:19) (in thread): > I must have stupidly changed the code between my last play and the commit. duh

Kevin Rue-Albrecht (05:03:44) (in thread): > for now just replace all occurences ofn_featExprPlotbyn_linked

Kevin Rue-Albrecht (05:03:47) (in thread): > sorry

Charlotte Soneson (05:03:50) (in thread): > Ok!

Charlotte Soneson (05:05:24) (in thread): > Yep, now it runs

Kevin Rue-Albrecht (05:09:28) (in thread): > Alright then. Possibly lower priority than, but feel free to send feedback or even refine the behaviour to more natural expectations of FACS/CyTOF users

Charlotte Soneson (05:10:18) (in thread): > Looks cool! I wonder whethermode_gatingwould be a more natural name (since lots of people are moving away from gating in CyTOF towards automatic cluster inference/tSNE/whatever plots).

Kevin Rue-Albrecht (05:10:31) (in thread): > For simplicity I voluntarily excluded all other plot and table types for a first backbone

Charlotte Soneson (05:10:43) (in thread): > I think that makes sense

Kevin Rue-Albrecht (05:10:48) (in thread): > Yep, that name crosses my mind too. I think you’re right

Charlotte Soneson (05:10:49) (in thread): > They can always be added later

Kevin Rue-Albrecht (05:11:44) (in thread): > Also I think one of the reasons for the main mode boot time is that we load one of each type. I think lighter, more specialised modes will boot up faster

Charlotte Soneson (05:11:45) (in thread): > And then, yes, maybe the features should be provided in a way that they can be immediately matched in pairs, and so that it is clear what will go on x- and y-axes

Charlotte Soneson (05:12:01) (in thread): > Yes, perhaps. This is indeed fast

Charlotte Soneson (05:12:21) (in thread): > Maybe there is a particular type that takes longer

Kevin Rue-Albrecht (05:12:46) (in thread): > I thought of a list of paired features. But it sounded more painful to type

Charlotte Soneson (05:13:00) (in thread): > That is true

Kevin Rue-Albrecht (05:13:00) (in thread): > Maybe a data frame of two columns

Charlotte Soneson (05:14:00) (in thread): > Yeah, with column namesXandYor so, so that they can be specified in any order. That would at least be interpretable. And the vector could be easily converted into such a data frame:slightly_smiling_face:

Kevin Rue-Albrecht (05:14:35) (in thread): > I’ve got a feeling that populatingselectizewidgets could be the slowdown

Kevin Rue-Albrecht (05:15:00) (in thread): > just thinking about ‘heavier’ widgets, with more items in them

Charlotte Soneson (05:15:16) (in thread): > Yes, that’s probably true.

Charlotte Soneson (05:23:01) (in thread): > I don’t notice a big difference in launching time for apps containing only a single panel, depending on that panel.

Kevin Rue-Albrecht (05:23:45) (in thread): > ah my theory collapses then:confused:

Charlotte Soneson (05:24:12) (in thread): > But I don’t know if there is a way of measuring this objectively, now I was just launching and waiting…

Charlotte Soneson (05:24:48) (in thread): > I timed the creation of the app (withapp<-iSEE(...)), and that was independent of the type.

Kevin Rue-Albrecht (05:25:03) (in thread): > btw, sorry again about my typo inmode_CyTOF. However, I’ve just found out that the cytof example in the vignette still refers togeneExprs...instead offeatExprs. I’ll solve both tonight if no one gets to it during the day

Kevin Rue-Albrecht (05:25:35) (in thread): > oh I don’t mean the creation of the app. I mean the initialisation of the various panels at run time

Charlotte Soneson (05:25:48) (in thread): > Yes, the vignette is indeed a bit outdated. I pushed just at the time of the change, and thought I’d wait until we had converged on a nomenclature.

Charlotte Soneson (05:26:03) (in thread): > Ah, I see. I thought you meant the launch time of the app, depending on theinitialPanels

Kevin Rue-Albrecht (05:26:15) (in thread): > I’ve timed the whole app generation to the moment where plot get displayed and it all happens lighting fast

Kevin Rue-Albrecht (05:26:27) (in thread): > it seems that it’s only the rendering that causes the pause

Kevin Rue-Albrecht (05:26:46) (in thread): > plus, all the plots/tables show simultaneously

Charlotte Soneson (05:26:49) (in thread): > Yep, seems reasonable

Charlotte Soneson (05:27:28) (in thread): > But if some panel types were heavier than others, I suppose you would also see that if you launch an app with only that panel (and measure the time until the plot is shown)

Kevin Rue-Albrecht (05:27:38) (in thread): > which seems to point at a within-Shiny stack of tasks, rather than something in our control

Kevin Rue-Albrecht (05:27:49) (in thread): > absolutely

Kevin Rue-Albrecht (05:28:17) (in thread): > that’s the thing, it’s not like the app shows 3 panels, lags on the 4th one, and then shows the last 2

Charlotte Soneson (05:28:30) (in thread): > No

Kevin Rue-Albrecht (05:28:35) (in thread): > it’s just the whole app that freezes for a couple of seconds, and then all plots show together

Kevin Rue-Albrecht (05:28:46) (in thread): > I think that just says it’s not in our control

Charlotte Soneson (05:28:57) (in thread): > Yeah, I tend to agree with that feeling

Aaron Lun (06:33:22): > Can we mergeheatwithmasteronce the heatmaps are done.

Aaron Lun (06:33:38): > We can fix the tests on a new branch; butheatis getting pretty damn big.

Charlotte Soneson (06:35:08): > I will try to get to the capping later today, but I have some other things I need to do first. Is there anything else pending there?

Charlotte Soneson (06:35:38): > And do we need to fix the tests first (or comment out the ones that don’t work) in order to be able to even mergeheatintomasterdue to the protection…

Aaron Lun (06:37:09): > Ah crap.

Aaron Lun (06:37:12): > Forgot about that.

Aaron Lun (06:37:26): > All right, let’s do the bare minimum necessary to get it functional again.

Aaron Lun (06:53:00): > Currently working on brush link tests.

Kevin Rue-Albrecht (06:55:10): > Perfect. I’ll clean up theCyTOFbranch tonight following on the thread with Charlotte. I think that’ll give a nice demo of how to use the functions indefaults.R

Kevin Rue-Albrecht (06:55:29): > btw: that doesn’t impact on theheatbranch

Kevin Rue-Albrecht (06:56:35): > bonus: it’ll probably make the code chunks simpler to write in the vignette section about CyTOF data

Federico Marini (07:19:58) (in thread): > Chimin’ in here: I’d assign the vignette/doc curation to myself, as I could not help that much on this round of implementation

Kevin Rue-Albrecht (07:20:22) (in thread): > absolutely, no worry

Federico Marini (07:20:51): > Just demoed the lasso part to a colleague

Kevin Rue-Albrecht (07:20:57) (in thread): > as a heads up, don’t bother too much with the CyTOF section until I clean up the branch of the same name

Federico Marini (07:20:59): > jaws dropped:slightly_smiling_face:

Kevin Rue-Albrecht (07:21:10): > hahaha, good to hear

Federico Marini (07:21:23): > one point - but that is probably hard

Federico Marini (07:21:45): > shiny has the nice feature of having the brushed area “movable” once it is created

Federico Marini (07:21:53): > I guess we can’t with our polygon?

Aaron Lun (07:36:58): > no

Kevin Rue-Albrecht (07:55:51): > awwww:stuck_out_tongue_winking_eye:

Aaron Lun (08:10:04): > Monster PR going intomastersoon.

Aaron Lun (08:10:23): > I will spend tomorrow documenting some of the internal functions.

Federico Marini (08:10:24): > noticed that live

Federico Marini (08:10:45): > shall we give another twitter shoutout for the lasso feature?

Aaron Lun (08:11:35): > Sure, if you want. Heatmaps, lasso and row data plots are the new features, from what I remember.

Federico Marini (08:12:14): > yep, enough to remind everyone that there’s new meat on the grill - or any other relevant metaphor:slightly_smiling_face:

Federico Marini (08:15:50): > reminder for the open big goals/implementation, from the minutes of our latest conf call: > - rowdata,:white_check_mark:- heatmap,:white_check_mark:- aesthetics:white_check_mark:- names, titles, brushed in/out, % n of N points

Federico Marini (08:16:07): > Only the refresh of the documentation would be strictly needed

Federico Marini (08:17:01): > i.e. general info (README, DESCRIPTION) , github tags too? + > Rd & vignette + > intro tour

Aaron Lun (08:17:05): > Yes, so we can push for submission at the EOM.

Federico Marini (08:18:10): > the hover info is not so feasible since we do not enter plotly, and the usage via server is somewhat covered - I did not test it yet, but sounded correct the way it was proposed by slowkow on GH

Charlotte Soneson (08:34:25): > Maybe this one would warrant a version bump…:slightly_smiling_face:

Aaron Lun (08:35:27): > Yes it would.

Charlotte Soneson (09:10:14): > I pushed a commit with color range setup for centered data, where one of the provided color scales are used. To work properly it assumes that the lower bound is <0 and the upper bound is >0, I think that makes sense (since I explicitly set the color at 0 to be the middle color in the scale). I don’t know where is the best way to check this: should thetextInputreset if one tries something else, or should it be some other type of input?

Aaron Lun (09:19:30): > will have a look at this in a second, got to deal with something first.

Kevin Rue-Albrecht (09:24:00): > We should probably soon start including updates to theNEWSfile as part of our development cycle. Probably only from the moment we submit to BioC, though

Aaron Lun (09:24:24): > At every PR, I would say.

Kevin Rue-Albrecht (09:25:16): > I’m repeating myself from this weekend (call it a self-reminder): The warning messages aboutscale_sizecollision between the lasso path and the boxes of the griddotplot still bugs me. I wanna look into that to keep a console as clean as possible

Aaron Lun (10:56:41): > looking at the capped color bar; the cap does succesffully restrict the color range, but the actual numerical values on the color bar do not change. Is this intended?

Kevin Rue-Albrecht (10:57:51): > Without checking visually, that sounds like the intended behaviour

Aaron Lun (10:58:03): > I would have expected the colour bar itself to contract.

Kevin Rue-Albrecht (10:58:04): > It highlights the capping to the user

Aaron Lun (10:58:15): > Hm. I guess that’s true.

Aaron Lun (10:58:18): > Okay, that’s fine then.

Kevin Rue-Albrecht (10:58:53): > If I get it correctly, the numerical values show the full range, while the capping preserves the color beyond the caps, is that right?

Kevin Rue-Albrecht (10:59:23): > because that’s what I would have expected

Aaron Lun (10:59:41): > Yes, that’s the case.

Kevin Rue-Albrecht (11:00:30): > I have to admit that I can imagine some (corner?) cases where that would compress the color range to a tiny fraction of the color bar

Kevin Rue-Albrecht (11:01:04): > Dunno how frequent/frustrating those cases are

Aaron Lun (11:02:23): > Probably fine, I would say.

Aaron Lun (11:03:44) (in thread): > Just add ashiny::validate, I think. I’ve only used theupdate*Inputsfunctions in situations where the invalidity affects the state of the app (and thus downstream observers), rather than just a single plot.

Aaron Lun (11:10:43): > Also, the legend plot gets cluttered pretty quickly. Is there a way to force the legends to align horizontally, rather than switching to a new line (which pushes some legends out of the plot’s viewport)?

Aaron Lun (11:48:13): > Added support for reclustering genes.

Aaron Lun (12:00:19): > Supported heatmap in the code tracker.

Aaron Lun (12:02:15): > @Charlotte SonesonThe heatmap output code could do with some prettifying re. line widths.

Aaron Lun (12:08:23): > How easy would it be to add zoom for the heatmap?

Aaron Lun (12:08:49): > It would only affect the heatmap itself; the annotation bars would be considered part of the axes, for example.

Federico Marini (12:12:18): > would the activation of the brush already grant the zoom?

Federico Marini (12:12:48): > not the brush brush like receiving the brush, but the simple brush&zoom

Aaron Lun (12:13:18): > The shiny side is not the problem; it’s making sure that the ggplot side can respond to a new set of coordinates.

Federico Marini (12:13:33): > with the doubleclick on the brushed area

Aaron Lun (12:13:44): > Or more precisely, to figure out where the new set of coordinates actually refer to with respect to the heatmap.

Aaron Lun (12:14:03): > To translate the x/y into genes/cells; this is not so obvious in the grid layout, due to the annotation on the top.

Federico Marini (12:14:46): > true.

Federico Marini (12:15:02): > hm. I don’t know how feasible/hard this could be

Federico Marini (12:15:21): > I had in pcaExplorer a static plus an interactive heatmap

Federico Marini (12:15:52): > but it can work differently now that we do it in ggplot2?

Aaron Lun (12:16:05): > ¯*(ツ)*/¯

Federico Marini (12:16:09): > (oh well, and I was not using the brushing info either)

Federico Marini (12:16:25): > i was merely changing the view on more or less zoom

Federico Marini (12:17:11): > side rant: would that be so hard for NCBI to have a damn proper correspondence between SRA and GEO

Federico Marini (12:17:28): > (spoiler alert, answer isyes, most likely)

Aaron Lun (12:18:20): > Well, Sanger and EBI’s computer systems don’t like talking to each other.

Aaron Lun (12:18:27): > And the buildings are 50 meters apart.

Aaron Lun (12:18:39): > It’s easier just to dump data to a hard drive and walk over.

Federico Marini (12:19:11): > eheheheh

Federico Marini (12:19:22): > ok, it’s more a Schadenfreude eheheheh

Federico Marini (12:21:11): > I feel Charlotte is feeling the same pain again:stuck_out_tongue:

Charlotte Soneson (12:21:23): > I agree with the comments on the heatmap code and the legend plots are fixable. I really just gotta ride out this migraine first and then I’ll fix that…:confused:

Aaron Lun (12:22:07): > Yes, I too have this weird rash on my legs.

Aaron Lun (12:55:00): > Pretty restrained convo on the BioC devel mailing list

Aaron Lun (12:56:46): > Adding internal documentation; how do we avoid exporting the docs?

Federico Marini (13:04:00): > would it be fine to remove the roxygen comment and leave it as if we roxygen’ed?

Aaron Lun (13:05:52): > Huh?

Aaron Lun (13:06:10): > Currently documenting.spawn_brush_chartinbrushing.R.

Aaron Lun (13:06:17): > devtools::document() complains that .spwan_brush_chart.Rd is an invalid name, which is fair enough.

Federico Marini (13:06:59): > oh

Federico Marini (13:07:13): > you want to create the .Rd

Federico Marini (13:07:28): > I thought we do document, but only in text, above the func itself?

Federico Marini (13:07:35): > sorry if I misunderstood this

Aaron Lun (13:07:50): > There’s no guarantee that it’ll stay up to date if we don’t Roxygenize regularly.

Aaron Lun (13:07:58): > Internal functions being what they are.

Aaron Lun (13:08:40): > Of course, we can just tell it not to export it… but I don’t know how to do it.

Aaron Lun (13:09:22): > It would be nice if there was a flag to check the Roxygenized stuff, but not create the actual file.

Aaron Lun (13:10:56): > Perhaps@keywords internal

Kevin Rue-Albrecht (13:11:25): > Isn’t it just about removing the @export tag?

Aaron Lun (13:12:40): > That’s for putting the function in the NAMESPACE

Kevin Rue-Albrecht (13:13:19): > Yep but a function that’s not exported yet has a man page would raise a flag in CMD check no?

Aaron Lun (13:13:32): > yes.

Kevin Rue-Albrecht (13:13:38): > So I’d expect export to coordinate both

Aaron Lun (13:13:50): > The lack of exporting is not the problem.

Aaron Lun (13:14:11): > I’d likedocument()to check the Roxygen flags, even though the manpage doesn’t actually get built.

Aaron Lun (13:14:20): > This would encourage us to keep at least the arguments up to date.

Kevin Rue-Albrecht (13:14:27): > Ahh wow

Kevin Rue-Albrecht (13:14:36): > Eh i don’t know about that one

Aaron Lun (13:14:37): > Otherwise, like most parts of the genome, the documentation would just degrade over time.

Kevin Rue-Albrecht (13:15:08): > Well.. just like us, most of the source would be non coding

Aaron Lun (13:15:17): > junk.

Aaron Lun (13:15:23): > Let’s call a spade a spade here.

Aaron Lun (13:15:30): > Despite whatever ENCODE says.

Kevin Rue-Albrecht (13:15:48): > Not even regulatory? Aww

Federico Marini (13:15:57): > dan graur GROWLING now:smile:

Aaron Lun (13:16:33): > How about this; we getdocumentto create the documentation, but we don’t commit it.

Aaron Lun (13:16:46): > This should give us the best of both worlds.

Kevin Rue-Albrecht (13:17:31): > Oh yeah. A bit of gitignore can’t hurt that much

Aaron Lun (13:17:52): > Let me finish off the brushing example, and we can see whether or not we agree on this.

Aaron Lun (14:04:59): > Okay, have a look atheat. Try as best as you can to putimportFromas close to where it’s used, rather than dumping everything iniSEE-pkg.R.

Aaron Lun (14:08:36): > Doesn’t really matter if we doble-up on importFrom statements, either.

Charlotte Soneson (14:22:31): > What about putting the legends horisontally? I don’t think we can safeguard against all possible numbers and types of annotations, at some point people are just going to have to change the size of their panel if things don’t fit…

Charlotte Soneson (14:22:41): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-02-19 at 20.22.11.png - File (PNG): Screen Shot 2018-02-19 at 20.22.11.png

Kevin Rue-Albrecht (14:28:16): > That looks cool:slightly_smiling_face:Also, I can’t wait to reply to the first users who suggest that we ‘grid-organise’ legends, to fit more in the available space:wink:

Kevin Rue-Albrecht (14:29:05): > PS: the branch network is getting fun to look athttps://github.com/csoneson/iSEE/network

Kevin Rue-Albrecht (15:19:02) (in thread): > btw, I’m changing the interface to themode_gating

Kevin Rue-Albrecht (15:19:42) (in thread): > introducing adata.frameto define Y/X features made me realise that the number of rows will definen_linked

Charlotte Soneson (15:20:00) (in thread): > Right, cool

Aaron Lun (15:26:16): > Looks pretty good to me.

Aaron Lun (15:27:04): > Yes, the branch network has always been a source of some amusement for me.

Aaron Lun (15:28:29): > Hey, is the “NA” in core type a “NA” string, or actually missing?

Kevin Rue-Albrecht (15:29:28): > actually missing

Kevin Rue-Albrecht (15:29:36): > remember the issue about brushing?

Kevin Rue-Albrecht (15:30:15): > also, ggplot is pretty smart about that: it tends to give a default grey color to trueNAvalues

Kevin Rue-Albrecht (15:30:45): > a default that can be controlled separately from real levels, obviously:wink:

Aaron Lun (15:31:02): > Hm. Okay. I’ll let it slide this time…

Kevin Rue-Albrecht (15:31:26): > now that you point it out, i can see it for Secondary.Type as well, same colour

Kevin Rue-Albrecht (15:52:33): > here we go,mode_gatingdocumented and exported

Aaron Lun (16:39:49): > what’s with thesample()for defaultfeatures? Looks a bit odd to me.

Kevin Rue-Albrecht (16:40:14): > yeah.. feedback welcome. i just wanted to throw in something for demo

Kevin Rue-Albrecht (16:40:31): > probably best left as a mandatory argument

Aaron Lun (16:40:48): > Yeah, I would say so too.

Aaron Lun (16:44:48): > I’m going to demo the latestheattomorrow - hopefully everything is functional!

Kevin Rue-Albrecht (17:48:12): > just playing with the gating mode, i wonder: when a bunch of plots are serially linked all with restrict, if say (1) gets brushed, (2) gets restricted, but (3) that depends on (2) [by restrict, remember] still showsallthe data points even those filtered out of 2 by 1 (even though 2 isn’t brushed yet)

Kevin Rue-Albrecht (17:48:47): > In the absence of brush on (2), should (3) be updated to show only points present in (2)?

Kevin Rue-Albrecht (17:50:03): > in a way, I would say “no”, as the current behaviour is, because despite the “restrict” relation 2->3, as long as 2 isn’t brushed, 3 has no reason to hide any point,even those that aren’t present in 2 because of 1, right?

Kevin Rue-Albrecht (17:58:19): > yeah, nevermind, it’s actually brilliant the way it is

Kevin Rue-Albrecht (17:58:55): > @Aaron Lun: it will all be much prettier in my next push, where the example in the man page select the top variable genes; it’s also more deterministic

Aaron Lun (18:30:35): > Killed this giant fucking mosquito in my room

Aaron Lun (18:30:43): > It was probably giving me the rash

Aaron Lun (18:31:04): > It was so large I thought it was a moth, so I didn’t kill it when I first saw it a few days ago

Kevin Rue-Albrecht (18:31:44): > more meat to grill if you let them feed for a while

Aaron Lun (18:31:58): > I’ll, uh, keep that in mind.

Kevin Rue-Albrecht (18:34:53): > unrelated: i just caught up on that bioc-devel thread. damn he’s trying hard to bring us back to R≥2.3

2018-02-20

Federico Marini (02:51:42): > Jeez - too many people want to grab a gun and shoot themselves in their feet. Funny how different persons came up with very similar points, are the two colleagues?

Federico Marini (04:10:52): > naive question, when running the example of isee now I cannot see the DT from the row stats table

Federico Marini (04:11:00): > yet, the table is linked to other plots

Federico Marini (04:11:12): > are you also having this?

Federico Marini (04:12:42): > ok, i think i got it

Federico Marini (04:12:59): > we removed this “fake” column that let the table be displayed, i guess

Kevin Rue-Albrecht (04:13:31): > Morning idea: brush on the sequencing lane, see the dimRed based on read counts restricted to cDNA fragments in that area:innocent:

Kevin Rue-Albrecht (04:13:55): > What « useless »?:stuck_out_tongue_winking_eye:

Kevin Rue-Albrecht (04:20:03): > bit ofRsamtoolshere, bit ofRsubreadthere …

Kevin Rue-Albrecht (04:21:34): > on a more serious note, I think I just finally figured out a ‘fix’ to thescale_sizeconflict between the lasso and griddotplot on my walk to work this morning. I’ll implement/test tonight

Aaron Lun (04:22:10): > @Federico MariniThe fake column is back.

Aaron Lun (04:22:34): > @Kevin Rue-AlbrechtDid you fix the colour-by-feature name validation error? It still shows up for me.

Kevin Rue-Albrecht (04:23:27): > eh.. did i fix it on a branch different thanheat?:face_with_raised_eyebrow:

Kevin Rue-Albrecht (04:23:33): > lemme check

Aaron Lun (04:24:46): > I’m still seeingchosen_gene %in% rownames(se)in.process_colorby_choice_for_row_plots

Kevin Rue-Albrecht (04:24:50): > oh no wait, i haven’t fixed anything about color.. only the X axis

Aaron Lun (04:24:57): > Okay, I’ll do it then.

Kevin Rue-Albrecht (04:25:11): > i fixed it here:https://github.com/csoneson/iSEE/commit/54463be172624efea68e3a1773b9727ce26c666d#diff-8912ca2ee6504bef8f23a001cfb07051L132

Kevin Rue-Albrecht (04:25:25): > i guess you’re looking at something nearby

Kevin Rue-Albrecht (04:26:33): > right, i see it too. sorry

Aaron Lun (06:31:42): > Internal default functions have been documented.@Charlotte Soneson- need to add some documentation for heatmap defaults.

Kevin Rue-Albrecht (06:33:20): > Nice one. I’ll go through as much of the plotting functions then tonight, if there is nothing more urgent first (?)

Aaron Lun (06:35:36): > Not from my end. I didn’t get to demo it, we ran out of time. Again.

Kevin Rue-Albrecht (06:36:19): > oh right, didn’t realise what you meant by demo, thought you mean “test”. Group meeting? Seminar? bigger?

Aaron Lun (06:44:11): > Group meeting

Charlotte Soneson (07:47:15): > Ok, I’ll have a look at the heatmap defaults documentation

Aaron Lun (07:54:23): > Should be as simple as adding a new @section.

Aaron Lun (08:39:53): > Almost finished documenting all of the functions I have primary responsibility for. Onlymisc.Ris left.

Kevin Rue-Albrecht (08:41:36): > Nice:slightly_smiling_face:Speaking or responsibility: who’ll take care of users per R 3.5?:innocent:

Kevin Rue-Albrecht (08:43:24): > I like the guy’s last reply, ‘teaching’ Vince how Bioc works:joy:

Aaron Lun (08:56:30): > lol

Aaron Lun (08:56:44): > won’t someone think of the children?

Aaron Lun (09:37:28): > God, the misc functions are so mind-numbingly boring.

Kevin Rue-Albrecht (09:38:18): > not sure whether I’m willing to share the fun-time ofplotting.Rwith anyone:stuck_out_tongue:

Aaron Lun (09:40:20): > I have been doing this for 5 hours straight, so a bit of fraying around the edges is to be expected.

Kevin Rue-Albrecht (09:40:55): > I think it’ll all be worth it, and we’ll be glad to have this in a few months

Aaron Lun (10:20:14): > AW GOD

Aaron Lun (10:20:19): > GOD THIS IS PAINFUL

Federico Marini (10:53:19) (in thread): > Go go Lori - I expect this is not yet over with that guy:disappointed:

Kevin Rue-Albrecht (10:54:40) (in thread): > I anticipate his end goad is to support Windows Vista

Federico Marini (10:55:31) (in thread): > WinXP FTW

Kevin Rue-Albrecht (10:55:57) (in thread): > I always liked that one. Waited until Vista got replaced to upgrade

Aaron Lun (11:04:31): > I’m done. I can’t do anymore today.

Kevin Rue-Albrecht (11:06:10): > I’m still impressed by the time you find for it every day

Aaron Lun (11:06:18): > I’m at the EBI so I don’t want to do any real work.

Aaron Lun (11:06:35): > Also I finished the beachmat revisions, so I’m in a decent mood.

Kevin Rue-Albrecht (11:07:42): > I hear they’ve got pretty good job packages, for that kind of freedom:smirk:

Aaron Lun (11:21:15): > Wondering whether the text on the x-axis in violin plots and grid plots should be vertical… Same for the continuous legends. Currently they just overlap each other on small screens.

Aaron Lun (11:21:21): > e.g., secondary type.

Kevin Rue-Albrecht (11:21:53): > arf, yeah

Kevin Rue-Albrecht (11:22:42): > maybe not strictly vertical, sthg liketheme(axis.text.x = element_text(angle = 60))

Aaron Lun (11:23:09): > Angled text is pretty bad when it gets even moderately compact.

Kevin Rue-Albrecht (11:24:53): > ok. (there is alsoelement_text(... hjust=H, vjust=V)) that can help sometimes, although I’d rather not research the magic formula to computeHandVdepending on the number and character length of the labels…

Aaron Lun (11:27:09): > I guessangle=90should do the job, then?

Kevin Rue-Albrecht (11:27:25): > yep, let’s go for it

Aaron Lun (11:29:07): > If you’re documentingplotting.R, I’ll leave it to you to fiddle with.

Kevin Rue-Albrecht (11:29:27): > I’m just wondering whether we could enforce a sort of label trimming to a max length (text = paste0(letters, collapse = "");gsub("^(.{10}).*", "\\1...", text))

Aaron Lun (11:30:19): > … I suppose we could. Though this is really the user’s responsibility. If they give us gibberishly long strings, that’s their own fault.

Aaron Lun (11:30:31): > It’s pretty easier to just dosubstrbefore heading into the app, if they need to.

Kevin Rue-Albrecht (11:30:38): > yup

Aaron Lun (11:31:46): > And panel height is fairly cheap, so you can just make panels taller if the names are long.

Aaron Lun (11:32:05): > Panel width is admittedly more difficult as increasing width will kick other panels off the same row.

Aaron Lun (11:32:55): > Also realized I have primary responsibility fordynamicUI.R- dammit.

Aaron Lun (11:34:09): > Will deal with that tomorrow. I no longer have the appetite for it tonight.

Kevin Rue-Albrecht (13:53:25): > :tada:just realised: we passcheckagain:tada:

Aaron Lun (13:53:35): > Yeah.

Kevin Rue-Albrecht (13:53:43): > nicely done

Kevin Rue-Albrecht (13:55:51): > alright, if it’s still there I’ll look into this ‘vertical X labels’ thing, and also test the fix for thescale_sizeclash that I keep ranting about

Kevin Rue-Albrecht (13:56:16): > that’ll warm me up for dealing with theplotting.Rdoc

Aaron Lun (13:56:18): > Yep

Aaron Lun (13:56:22): > I haven’t touched the plots.

Aaron Lun (13:56:45): > Have a look at some of the documented functions, though, to get a feel of the style of the internal docs.

Kevin Rue-Albrecht (13:58:40): > yep, i went straight foriSEE-extras

Aaron Lun (14:24:10): > Formode_gating; I suggest using camelcase for exported functions, because that’s what we’ve being doing so far.

Kevin Rue-Albrecht (14:27:28): > oh right, sorry

Kevin Rue-Albrecht (14:28:12): > i actually meant to brainstorm with<!channel>whether there was better naming convention for ‘modes’

Aaron Lun (14:28:47): > If you plan on adding more of them, probably best to have a consistent prefix

Aaron Lun (14:28:49): > likemodeGating

Aaron Lun (14:28:57): > orsetupGating

Aaron Lun (14:29:06): > orinitializeGating

Kevin Rue-Albrecht (14:29:16): > gatingModesounded more natural, but I’m attracted to the idea of a (consistent prefix, as you just wrote), to facilitate browsing using autocompletion

Kevin Rue-Albrecht (14:29:38): > nah, notinitialize, that’s going to be misleading with other methods

Charlotte Soneson (14:29:40): > I likemodeGating

Kevin Rue-Albrecht (14:32:52): > (also, I’m in the process of adding the corresponding unit test formodeGating, btw)

Kevin Rue-Albrecht (18:14:33): > damn i knewplotting.Rwould be … an exercise of navigating the code back and forth between functions ^^

Aaron Lun (19:12:33): > It shouldn’t be that hard, I would have thought - the hierarchy of calls is fairly clear, and you can just pass off...as “further arguments to be passed to X”.

Kevin Rue-Albrecht (19:30:38): > i just see you message now that I was about to post: “thank god for the refactoring: once past the first function, a good dose of copy-paste makes the following ones pretty simple”

Kevin Rue-Albrecht (19:33:31): > I’ll see how much will I have left when I’m done with the basic documentation of each function, but I’ve long been tempted to document the...of.create_plot. It’s really the hub of plotting arguments

Kevin Rue-Albrecht (20:57:09): > almost there, i can’t leave it at 5 functions from the end ^^

2018-02-21

Kevin Rue-Albrecht (03:39:49): > @Aaron Lun: just crossed my mind, looking back at the remaining open issues, in this case the ‘info on hover’ one: would it make sense to have a widget (radio button or selectInput) to switch the behaviour of single-click between “lasso” and “label ID”? > As it says on the tin, I’d expect the click to add aggrepel::geom_repel_text()layer that annotates the data points nearest to the click (within a maximal range, maybe). > Double-click behaviour would then have to be further divided depending on the switch status, to clear either an existing lasso or existing point labels. Although double-click could also clear the other if the first one isn’t there (to avoid having to constantly switch the input). > If we were going this way, I’d suggest an app-wide switch in a modal, to avoid overcrowding thebrush parametersbox, and also because I wouldn’t expect users to often use the two types of click behaviour simultaneously on multiple plot panels. Rather, I’d imagine a period of time in the sessions lifetime where users would be labelling data points in the various plots, without further brushing at that point.

Aaron Lun (04:18:02): > Dunno.

Aaron Lun (04:18:15): > I guess we could.

Aaron Lun (04:18:54): > But we’re probably overloading the click operator; the double-click operator has way to much behaviour already.

Kevin Rue-Albrecht (04:20:36): > I had this feeling too while describing the idea.

Kevin Rue-Albrecht (04:21:31): > Plus, given the choice, I’d prefer the transient effect of a hover to a permanent label

Aaron Lun (04:28:25): > Wow. All of you guys really like your manual word wrap, don’t you.

Aaron Lun (04:31:07): > In any case, make sure you distinguish between “Shiny brush” (i.e., the thing that Shiny makes) and “brushing” in general (i.e., any selection between plots, be it with the Shiny brush or lasso). This is particularly pertinent in the documentation forprocess_brushby_choice- see.spawn_brush_chartfor details.

Aaron Lun (04:32:35): > Just being precise with the terminology should be sufficient - on your first mention of general brushing in a given documentation file, note that it includes both the Shiny brush and lasso selection. Otherwise, if you are referring explicitly to Shiny brushing, mention “Shiny brush”.

Kevin Rue-Albrecht (04:46:10): > absolutely, I vaguely remember catching a few “Shiny brush”/“brushing” in my half-sleep last night, but i may well have been a bit inconsistent between the first few functions and the last ones

Kevin Rue-Albrecht (04:55:11): > Also, I’ve dropped thescale_sizeof lasso waypoints for a smarter use of point shapes. I started looking into your idea of drawing the actual rectangle that would capture a closing click, but that would mean: > - either somehow making.self_lasso_pathaware of the plot bounds, so that it can recomputerange/100- sticking those bounds as additional attributes on the matrix of waypoint coordinates (kinda makes sense, to define waypoints with their bounding box as attribute) > - adding an extra call to a new function iniSEE.Rthat would be given the bounding box coordinates and the first lasso point to generate the appropriate ggplot layer

Aaron Lun (04:57:54): > Don’t worry about that ATM, I think.

Kevin Rue-Albrecht (05:01:14): > To be fair, I’m quite happy with the current state of affair on this aspect. The default point size, even though relatively small, seems a pretty good approximation of that target box.

Charlotte Soneson (05:16:12): > @Kevin Rue-AlbrechtJust wondering: are theiSEE:::necessary in themodeGating? It gives lots of warnings in the check.

Kevin Rue-Albrecht (05:17:30): > oops. maybe not, i’ll check again, but off the top of my head, i think it’s leftovers from developing it in an R script initially

Charlotte Soneson (05:17:53): > yes, I thought so. I can try to remove them then.

Kevin Rue-Albrecht (05:17:57): > thanks for pointing out the warnings, I missed them in the midst of a few documentation-related ones

Kevin Rue-Albrecht (05:18:24): > oh cool, I’m happy to see you fix this if you have time. Thanks

Federico Marini (05:49:41) (in thread): > Good point. Especially when describing the main documentation, we should be homogeneous in this

Federico Marini (05:51:00) (in thread): > I recall at least from the excellent concepts defined in Tamara Munzner’s work that brushing is this area selection

Federico Marini (05:51:16) (in thread): > what we also do is what I would call “panel linking”

Federico Marini (05:51:31) (in thread): > when we go i.e. table-to-plot

Aaron Lun (05:54:52): > Looking at plotting documentation. note thatidis an integer scalar.

Kevin Rue-Albrecht (05:57:11): > aargh, I was looking for that word and couldn’t remember it. I’ll also have to search-and-replace “value” by “scalar” in a few places then

Charlotte Soneson (05:58:59): > I have fixed some documentation issues inheat. But I don’t understand why it complains about a missing link to.panel_generationinINTERNAL_check_plot_feasibility.Rd

Kevin Rue-Albrecht (05:59:31): > I had this issue a few times last night and solved them, let me check this one

Kevin Rue-Albrecht (06:00:37): > seems to be because.panel_generationisn’t documented yet:https://github.com/csoneson/iSEE/blob/6f28ff400f5b17cfcbf206c1bc240debd0c007e2/R/dynamicUI.R#L42

Aaron Lun (06:04:02): > Also, make sure you refer to@param idas the “current” plot, see my latest updates. This is because it would otherwise be a bit confusing.

Aaron Lun (06:13:00): > And don’t forget the de-centralization of@importFromstatements.

Kevin Rue-Albrecht (06:13:44): > I’ll browse back the channel to list your last few points in a to-do list for later. Do we have a better place to list them, which isn’t as formal as GitHub issues?

Aaron Lun (06:14:07): > ¯*(ツ)*/¯

Kevin Rue-Albrecht (06:14:27): > btw,griddotplotis the only (awww) plot that doesn’t end in_plot. Suggestions?

Aaron Lun (06:14:47): > Rename it if you like, I don’t really care.

Kevin Rue-Albrecht (06:15:50): > well, me neither, but going through the code in one go was akin to a manuscript proof-reading: made me spot those small details/inconsistencies

Aaron Lun (06:15:59): > Oh, there’s a lot of them.

Aaron Lun (06:16:36): > I need to go and replace all instances ofiwithidas well.

Kevin Rue-Albrecht (06:17:19): > I also spotted some variable names that are a bit misleading and should probably be renamed systematically: for instance to differentiate betweencmd(character vector) and maybecmdList(list of character vectors)

Kevin Rue-Albrecht (06:17:53): > That’s mostly what slowed me down in documenting commands, list of commands, and lists of lists of commands

Kevin Rue-Albrecht (06:18:14): > had to track down where they were generated and passed up/down

Aaron Lun (06:19:03): > In any case,@Federico Marini; suggest rolling out the annotation facility into a separate function. That is;iSEEwill take an “annotation function” that returns a HTML tag object upon being supplied a row index and SCE object. You can then write a function that generates this function given the annotation information (i.e., orgdb and etc.) This generalizes it for users where the annotation may not be org’able, or even genes.

Aaron Lun (06:19:24) (in thread): > As long as it’s underscored for internal functions/args.

Aaron Lun (06:19:39) (in thread): > This rule isn’t applied consistently either, so we’ve got to fix that.

Kevin Rue-Albrecht (06:19:46) (in thread): > agreed

Kevin Rue-Albrecht (06:20:03): > That’ll be cool to have indeed

Aaron Lun (06:21:22): > For example, one might prefer to have links to UCSC for genomic regions.

Kevin Rue-Albrecht (06:24:03): > Dunno if it would make things simpler of more complicated, but I’ve been meaning to look intoGSEABase::CollectionTypefor a while now.

Aaron Lun (06:25:21): > It may be possible to supply a set of pre-defined groupings for the heatmap plot.

Kevin Rue-Albrecht (06:25:53): > I’ve leftGOexpresswith an ugly home-madedata.frameof annotations, and just can’t find the time/support (as in funding) to update it

Aaron Lun (06:37:00): > I’ve also noticed that everyone seems quite trigger happy with wrapping things in\codein the docs.

Aaron Lun (06:38:20): > As a general rule, this probably isn’t necessary when you’re referring to a class name or object type.

Aaron Lun (06:39:10): > I too used to put\code{SOME CLASS}until I looked at the Bioc core docs - e.g.?GRangesdoesn’t\code{DataFrame}.

Aaron Lun (06:39:38): > \code{list}is particularly unnecessary, unless you’re explicitly referring to the action of making a list.

Federico Marini (06:39:59): > pleading guilty on this - I thought it was helpful to highlight what a more program-related thing is, and what is just purer text

Aaron Lun (06:40:38): > Putting to many things in\codemakes the entire block quite difficult to read, so perhaps we should be more judicious in our choice of what to put in and what to leave out.

Aaron Lun (06:41:23): > I’ll admit that I’m not always consistent with this, but we should try our best nonetheless.

Kevin Rue-Albrecht (06:41:30): > pleading guilty too

Aaron Lun (06:42:17): > A good guide is the latex biocstyle, where class names are rendered with italics rather than monospace.

Federico Marini (06:44:04): > quick question for the heatmap team: the suggest feature order is nothing but adding the clustering of rows, right?

Kevin Rue-Albrecht (06:44:22): > yeah, I put a lot oflistand `character in code, where I thought worth to highlight, but probably best left in regular font to avoid distracting/overloading the reader with too much details

Aaron Lun (06:45:43) (in thread): > Yes, it will rearrange the elements in the selectize according to the clustering.

Federico Marini (06:47:37) (in thread): > ok, so thisandthat

Federico Marini (06:47:58) (in thread): > asking re. the tour elements that are missing

Federico Marini (07:42:13): > I fixed a couple of open things with the docs

Federico Marini (07:42:28): > soon to be done: finalizing the steps of the intro tour

Federico Marini (07:42:53): > the changes which are there will be soon merged with master - so that you do not duplicate the effort:wink:

Aaron Lun (07:43:30): > okay

Federico Marini (07:44:15): > I guess we all will throw a good eye on the consistency issues - which otherwise will be pointed to from the bioc reviewers:stuck_out_tongue:

Aaron Lun (07:44:59): > We can put style comments on the wiki, if someone wants to get started on that.

Federico Marini (07:45:28): > what I also see in some packages would be a contribution code

Federico Marini (07:45:38): > as plain text in the pkg

Federico Marini (07:45:54): > but that is more focused on the content than on the style

Federico Marini (09:30:33): > @Federico Mariniuploaded a file:Screen Shot 2018-02-21 at 15.30.10.png - File (PNG): Screen Shot 2018-02-21 at 15.30.10.png

Federico Marini (09:31:17): > Would we need some label to this selectable input? If so, which one would it be?

Aaron Lun (09:32:39): > ?

Aaron Lun (09:32:46): > Thought it would be pretty obvious that it’s the assay choice.

Aaron Lun (09:33:11): > In all cases, I deliberately set the label to NULL to compact the UI.

Federico Marini (09:33:26): > I am also for no labl

Federico Marini (09:33:39): > seems pretty self explanatory

Federico Marini (09:33:49): > but you know, users will be users:stuck_out_tongue:

Aaron Lun (09:34:05): > Well, if they can’t figure it out, there’s really no helping them.

Federico Marini (09:34:19): > amen to that

Aaron Lun (09:34:20): > I’m sure iPhones don’t have a label above the home button saying “Home”

Federico Marini (09:34:38): > hhihi

Federico Marini (09:34:42): > BTW, iPhones

Federico Marini (09:35:06): > let’s be ready for someone asking (demanding?) mobile device support

Federico Marini (09:35:07): > :smile:

Aaron Lun (09:37:52): > They’d need incredible motor control to handle the lassos.

Kevin Rue-Albrecht (09:39:24): > Actually, can widget have tooltips in Shiny? I can’t remember

Kevin Rue-Albrecht (09:39:58): > If so, we could maybe drop some of the most common/obvious widget labels

Kevin Rue-Albrecht (09:40:53): > PS: I sent a screenshot using Fede’s hosted app from my phone a while back. Doesn’t look too bad!

Kevin Rue-Albrecht (09:41:37): > (Just coming out of a 1:40 lab meeting, got an hour gap to our journal club:sleepy:)

2018-02-22

Kevin Rue-Albrecht (06:30:55): > :musical_score:Siiiiilent slaaaack, hooooollly slaaaack:musical_note:

Kevin Rue-Albrecht (06:40:56) (in thread): > going back through the messages to make my to-do list (finally got rid of the presentation to give this morning, freedoooom!)

Aaron Lun (06:41:32): > Bogged down with BK trees and k-mer distances.

Aaron Lun (06:41:36): > Hardcore bioinformatics.

Kevin Rue-Albrecht (06:42:41) (in thread): > i agree with@Federico Marinihere: from the first issue opened on GitHub, we’ve been referring to the panel-linking feature as ‘brushing’ between ourselves, and I think this transpired into the user-visible man pages. We’ll need to look at this more closely, if not already dealt with.

Kevin Rue-Albrecht (06:43:35): > :musical_score:Single cells, single cells, single in their well. Oh what fun it is to yield, so little RNA-hey!:musical_note:

Kevin Rue-Albrecht (06:44:00): > :musical_score:Guided by the flow, into different wells, stick a TSO, reverse complement:musical_note:

Aaron Lun (06:46:43): > I think you need a break.

Kevin Rue-Albrecht (06:48:53) (in thread): > just spotted this idea, which I think is a great use of the GitHub wiki.

Kevin Rue-Albrecht (06:50:25) (in thread): > do you have an example package (e.g. link to github code). I’m curious what you mean

Kevin Rue-Albrecht (06:52:35): > you don’t know how much you’re right ^^ although i still haven’t finished that song that i started a few months ago. Playing with my limits both of English and knowledge of library prep kits, to be fair:yum:

Federico Marini (06:54:31) (in thread): > this one is the first one that came to my mind now

Federico Marini (06:54:34) (in thread): > https://github.com/tidyverse/purrr/blob/master/CONDUCT.md - Attachment (GitHub): tidyverse/purrr > purrr - A functional programming toolkit for R

Federico Marini (06:55:19) (in thread): > some were quite more detailed, in terms of detailing the style too - i.e. the contributors are expected to stick to that, be them just us, or people proposing a PR

Federico Marini (06:55:43) (in thread): > but it is not so top priority, I think

Kevin Rue-Albrecht (06:56:51) (in thread): > oh right, that thing. > yeah, i’ve seen that GitHub ‘Insights’ panel called ‘Community’, e.g.https://github.com/tidyverse/purrr/communityweirdly enough theirs doesn’t get picked up by GitHub, I suppose one has to use their ‘Propose’ button on the same page to place the file where expected

Kevin Rue-Albrecht (06:57:37) (in thread): > I haven’t made use of this GitHub feature myself yet.iSEEcould be a good place to start

Aaron Lun (07:59:15): > Anyway, when you’re done, we’re due for a fresh PR.

Kevin Rue-Albrecht (08:20:09): > yep. just to be clear: currently active branches for documentation fixes areplotting2(me) andheat(charlotte and federico) , right?

Charlotte Soneson (08:21:46): > As far as I can remember I am only working on heat, yes.

Kevin Rue-Albrecht (08:27:54): > oh right, sorry I saw Fede’s name only because you merged his commits intoheat

Charlotte Soneson (08:28:38): > Ah no, I just meant that I am not working on any other branch:slightly_smiling_face:I think Aaron has also pushed some things intoheat.

Kevin Rue-Albrecht (08:34:59): > riiight, i get you now

Charlotte Soneson (13:40:51): > something weird seems to be going on in the.createColorPanelForColumnPlotsfunction in theheatbranch: the last argument has been changed tono_rows=FALSE(logical scalar), but as far as I can see it is still called withfeasibility, which is a list. Any insights as to which one to keep? It passes the check/travis testing, but nothing actually runs…

Charlotte Soneson (13:41:57): > Which made me think of another thing: if we want to increase the robustness of the code, I guess we should do all our function calls with named arguments rather than relying on the positional information…

Aaron Lun (13:46:08): > Oh, forgot to change it.

Aaron Lun (13:46:23): > Uh - get rid offeasibilityand add a check for whether there are any rows inse.

Charlotte Soneson (13:49:28): > ok

Charlotte Soneson (13:51:01): > you mean columns?

Charlotte Soneson (13:51:11): > or rows ofcolData(se)?

Aaron Lun (13:51:47): > No, number of features. It needs to knkow this in order to determien whether or not to provide colour-by=-feature options.

Charlotte Soneson (13:51:54): > Ah ok, sorry

Aaron Lun (13:51:54): > If there are no features, those options will be disabled.

Charlotte Soneson (14:40:26): > There should now be support for color capping also for non-centered data inheat

Kevin Rue-Albrecht (14:46:29): > i’m back into cleaningplotting.Rtonight

Kevin Rue-Albrecht (14:47:16): > @Kevin Rue-Albrechtshared a file:Plotting.R (and shared) to-do list - File (Canvas): Plotting.R (and shared) to-do list

Unknown User (14:47:16): > @Kevin Rue-Albrecht commented on @Kevin Rue-Albrecht’s file https://community-bioc.slack.com/docs/T35G93A5T/F04BQMU91TR: my to-do list for this evening - File (Canvas): Plotting.R (and shared) to-do list

Kevin Rue-Albrecht (14:48:32): > (although looking back at this list, I notice that i’ve also listed a few extras that I’m not dealing with like stuff inheat)

Kevin Rue-Albrecht (14:50:56): > damn I was trigger-happy indeed: 40 hits for\code{list}

Kevin Rue-Albrecht (15:06:52): > checking out theExperimentColorMapdoc, as well, how do you call alogical(1), i.e., a TRUE/FALSE argument?

Kevin Rue-Albrecht (15:17:06): > How does that look:https://github.com/csoneson/iSEE/wiki/Documentation-guidelines?

Kevin Rue-Albrecht (18:07:23): > I think I stumbled onto a weird behaviour with regard to self-brush (although I’m not sure how much this feature will actually be used): > - first of all, set redDim1 (for instance, I assume all plots are affected the same way at this point) to self-brush with transparency > - brush some points:it doesn’t apply the brush effect- if you then set the brush to color:it does refresh and apply the colored brush effect- if you double-click, the brush disappears (good), but the colored effect remains (not good) > - even setting the brush effect to ‘—’ does not remove the color

Kevin Rue-Albrecht (18:08:06): > - even setting the brush effect to another plot does not remove the color

Kevin Rue-Albrecht (18:08:28): > - one has to brush nothing on the other plot to finally reset redDim1

Kevin Rue-Albrecht (18:10:25): > - at that point you can restart playing with the self-brush issue, and show that it’s not jus atransparencyissue, but that color brushes also don’t get apply on self-brush if you don’t toggle the self-brush effectafterbrushing data points

Kevin Rue-Albrecht (18:13:49): > I’ve addressed most of my objectives for tonight, with the exception of: > - de-centralization of @importFrom statements. > - misleading variable names

Aaron Lun (18:20:26): > Re brush effect: probably one of the checks in the brush observer was too aggressive.

Aaron Lun (18:20:57): > I put in some protection to avoid unnecessary replotting when the brush was unchanged, or was absent, etc.

Aaron Lun (18:21:40): > But it may have done something unexpected, especially after our latest round of refactoring with lassos.

Aaron Lun (18:24:47): > … wait. Does it draw the brush box? Because then it’s probably an issue of forgetting to force re-rendering

Kevin Rue-Albrecht (18:24:56): > it does draw the brush box

Kevin Rue-Albrecht (18:25:34): > and at least the first lasso point (i haven’t bothered drawing an entire lasso, and already closed R for today)

Aaron Lun (18:25:58): > Yes, theno_rerendersetting is probably the culprit.

Aaron Lun (18:26:24): > Easily fixed by checking whetherpObjects$memory[[mode0]][i0, .brushByPlot] == plot.name.

Aaron Lun (18:26:44): > Though perhaps I should just get rid of the staged re-rendering entirely.

Kevin Rue-Albrecht (18:26:58): > alright, i hope you’re up for it, because i’m off to catch up on some sleep now

Aaron Lun (18:27:07): > I’ll do it tomorrow.

Kevin Rue-Albrecht (18:27:13): > good with me ^^

2018-02-23

Aaron Lun (04:21:28): > I’m going around raising issues and assigning jobs for all of us.

Kevin Rue-Albrecht (04:21:36): > perfect!

Aaron Lun (04:28:29): > Okay<!channel>, we all have a bit of work to do. I forgot Feb has fewer days than the other months so it’s a bit more of a rush than I thought, but let’s do what we can.

Kevin Rue-Albrecht (04:45:44): > Further aesthetic parameters #146:point_size,font_size,legend_positionprobably should be plot-specific (hence in a collapsibleBox -> assign to@Federico Marini?), I’d argue that default color for ‘colorless’ point should probably be an app-wide setting

Kevin Rue-Albrecht (04:46:30): > might be the the first one, but I’n expecting more to crop up in the future

Kevin Rue-Albrecht (04:48:29): > in somewhat lower priority, I’d also encourage another unit-test writing hackhaton (possible while the package is in Bioc review)

Federico Marini (10:05:58): > Is there a reason for having## Not run:as top line of iSEE-main.R?

Kevin Rue-Albrecht (10:06:07): > codecov

Federico Marini (10:06:08): > or just remnant of copy-pastes

Federico Marini (10:06:10): > ah

Kevin Rue-Albrecht (10:06:36): > but we should remove it, in fact

Kevin Rue-Albrecht (10:07:36): > initially i was worried that we wouldn’t be able to test a function that launches an interactive app (I did it a long time ago and wondered whyR CMD checkwas hanging … )

Kevin Rue-Albrecht (10:08:05): > but in our case the function returns the app, so if we catch the result the app isn’t launched

Kevin Rue-Albrecht (10:08:40): > … which means we can ‘unit test’ the function, and therefore there is no point excluding it from code coverage

Federico Marini (10:15:05): > k

Kevin Rue-Albrecht (10:16:47): > before I forget: if you do it, don’t forget to remove the pendant on## Not run:at the end of the file. > nevermind: I just checked and someone deleted it already

Kevin Rue-Albrecht (10:17:02): > so yeah the top one is a leftover of that other deletion then

Kevin Rue-Albrecht (10:18:01): > that’s actually good news: i’ve always thought that 40% was the coverage withiSEE()excluded, which is a wild understimation of our actual package coverage

Kevin Rue-Albrecht (10:19:12): > … considering thatiSEE()is 1,330 lines long

Kevin Rue-Albrecht (10:20:15): > for the record, we’re not doing too badly, once the shiny app itself is excluded: > > * Checking function lengths....................... > The longest function is 1330 lines long > The longest 5 functions are: > iSEE() (R/iSEE-main.R, line 88): 1330 lines > iSEE_server() (R/iSEE-main.R, line 254): 1157 lines > .panel_generation() (R/dynamicUI.R, line 42): 265 lines > .track_it_all() (R/codetrack.R, line 21): 142 lines > .make_heatMapPlot() (R/heatmap.R, line 1): 137 lines >

Kevin Rue-Albrecht (10:20:31): > 265 lines for the longest _actual_function

Aaron Lun (10:31:28): > Still pretty fucking long, tho

Aaron Lun (10:31:42): > BTW you can get a masssive spike in code coverage just by runningpanel_generation.

Aaron Lun (10:32:11): > this will run many of the internal UI functions. I would guess probably +10%

Federico Marini (11:47:44): > <!channel>theannotation_factorybranch is there for you - i might not be able to react promptly over the weekend, please feel free to edit yourselves small things if you spot somethng out

Aaron Lun (11:48:51): > Looks pretty neat

Federico Marini (11:50:25): > grazie mille:slightly_smiling_face:

Federico Marini (11:50:51): > (pretty empty of people in the building, glad to see someone interacting with me at least here eheh)

Kevin Rue-Albrecht (11:51:26): > (I can start singing on the channel again…:stuck_out_tongue:)

Charlotte Soneson (11:52:06): > Everyone is in the Biergarten celebrating the unexpected victory?

Aaron Lun (11:52:23): > Huh

Aaron Lun (11:52:27): > What?

Aaron Lun (11:52:30): > Oh

Aaron Lun (11:52:33): > right. Snow stuff

Charlotte Soneson (11:52:52): > Ice, in this case

Aaron Lun (11:52:53): > You europeans and your cold sports.

Federico Marini (11:54:06): > eheheh, no clue. but still, quite some people stick to the saying “freitag ab eins macht jeder seins”

Charlotte Soneson (11:54:29): > I thought it was “kein Bier vor vier”

Federico Marini (11:54:35): > well

Federico Marini (11:54:50): > here people do disappear at lunchtime on Fr

2018-02-24

Aaron Lun (11:07:20): > All mentions of color will now be American. None of thisunonsense.

Kevin Rue-Albrecht (11:07:29): > :stuck_out_tongue:

Kevin Rue-Albrecht (11:07:59): > sorry.. i still have PTSD from my PhD supervisor ^^

Aaron Lun (11:58:43): > BTW no one touchplotting.R; it is going through some SERIOUS refactoring. No line untouched, and many tests will probably break.

Kevin Rue-Albrecht (11:58:56): > ok i’m not working on it today

Aaron Lun (13:57:38): > Well, that was a failure.

Aaron Lun (13:57:44): > Turned out to be much more difficult than I thought.

Aaron Lun (13:57:58): > In the end, it didn’t seem worth it.

Aaron Lun (13:58:45): > Nonetheless, I was half-way through the refactoring, so it wasn’t all for nothing - if you look atplotting.Rnow, you’ll see that the plotting code is now fully separated from the generation ofplot.data.

Aaron Lun (13:59:25): > This should make it much easier to follow -.create_plotnow should only addggplot-related commands

Kevin Rue-Albrecht (13:59:55): > that sounds really nice, thanks!

Kevin Rue-Albrecht (14:02:26): > unrelated: i’m headed into one of those massive timeout on Travis.. I haven’t pushed code there in a loooong time, and now that I pushed a bug fix, it’s updating alotof packages ^^

Aaron Lun (14:54:37): > 400 commit monster in da house.

2018-02-25

Kevin Rue-Albrecht (09:46:06): > Btw, sorry for my inactivity this weekend. Taking a bit of heat here in Oxford. Apparently, restricting my iSEE work to evening and weekend is still impacting too much on the group’s activities:expressionless:Can’t wait to see the app used without credit for the development effort.. > Is ‘Additional documentation notes to fix #143’ likely to raise issues for the Bioc reviewer, if we submitted without closing it? I hope to handle it an evening this week

Aaron Lun (09:46:35): > Can push back a week, if you like.

Aaron Lun (09:46:47): > I have a stats course to give so will be out of action from Wednesday onwards.

Kevin Rue-Albrecht (09:47:18): > Hmm.. is there any other issue than 143 holding us back?

Aaron Lun (09:48:05): > I will need some assistance with 147 later.

Aaron Lun (09:48:56): > 146, I mean.

Kevin Rue-Albrecht (09:49:14): > ah, i was getting confused looking at 147 ^^

Charlotte Soneson (09:49:18): > I’m working on the heatmap zooming, but it also turned out to be more complicated than I imagined. For some reason my brushing doesn’t return the actual coordinates of the box, but rather values in [0, 1], as opposed to what it does for the other plot types. Haven’t managed yet to figure out why this is happening and if there’s anything to do about it. but that’s where I’m at.

Aaron Lun (09:49:37): > okay

Charlotte Soneson (09:49:41): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-02-25 at 09.23.46.pngand commented: brush output for different plot types: - File (PNG): Screen Shot 2018-02-25 at 09.23.46.png

Kevin Rue-Albrecht (09:50:21): > hm.. maybegeom_rasteruses relative coordinates in [0,1] for performance

Aaron Lun (09:50:22): > Maybe it’s because it’s set up in a grid?

Kevin Rue-Albrecht (09:50:51): > or more precisely what Aaron said

Charlotte Soneson (09:51:03): > But the funny thing is that if I addcoord_cartesianwith theactualcoordinates (not in [0, 1]) to a heatmap outside of the app, everything works fine

Charlotte Soneson (09:51:32): > So it knows about the values, but somehow doesn’t get them out of the brushing

Kevin Rue-Albrecht (09:51:48): > oh.. i wonder if therescale-ing things to a final (visual) [0,1] range, like what happens forscale_size

Kevin Rue-Albrecht (09:53:08): > I remember having trouble understanding how to talk toscale_size_*to control the mapping from ‘data’ values from a range [min, max] map the scale ‘plotted’ sizes in a range [0,1]

Kevin Rue-Albrecht (09:53:47):

a numeric vector of length 2 that specifies the minimum and maximum size of the plotting symbol after transformation.

Charlotte Soneson (09:54:19): > Hmm…ok

Kevin Rue-Albrecht (09:54:20): > arf.. one of those ‘obvious’ things.. once you know how they work

Aaron Lun (09:55:20): > Don’tq uite understand what you mean by addingcoord_cartesianand everything working fine.

Charlotte Soneson (09:56:51): > So, if I take the heatmap code from the app and just add+coord_cartesian(xlim = c(5.5, 10.5), expand = FALSE), for example, it zooms in to show 5 cells.

Charlotte Soneson (09:57:06): > As it should

Aaron Lun (09:57:29): > Right.

Aaron Lun (09:57:43): > So it’s strictly a problem with defining the coordinates of the brush.

Charlotte Soneson (09:57:58): > Yes, I think so

Kevin Rue-Albrecht (09:58:01): > so.. the brush returns values in the range [0,1] instead, right?

Aaron Lun (09:58:06): > Iscowplot_gridconfusing matters?

Charlotte Soneson (09:59:07): > Ah, that’s a good point, didn’t think about that. I don’t know whether that has an effect, but it might.

Kevin Rue-Albrecht (10:01:04): > we’re not just talking about multiplying/dividing coordinates by the number of rows/columns in the heat map, once we figure out which components (brush,plot,inputs) work with which range?

Charlotte Soneson (10:02:50): > Perhaps for the cells, but it looks like the y limits would be for the whole grid (including all annotations and the colorbar). And even for the cells I suspect it includes the y-axis label etc.

Kevin Rue-Albrecht (10:03:38): > uff, I mean ouch

Charlotte Soneson (10:04:02): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-02-25 at 16.03.29.pngand commented: For example, now if I try to brush the entire heatmap I get this - File (PNG): Screen Shot 2018-02-25 at 16.03.29.png

Kevin Rue-Albrecht (10:04:57): > damn, that looks like a pain:confused:

Charlotte Soneson (10:07:51): > Yes:confused:I thought it was just me missing some setting somewhere, which would have been much easier

Aaron Lun (10:08:18): > My money’s on cowplot_grid fucking things up.

Charlotte Soneson (10:09:09): > Yes, mine too now…it probably just places everything nicely in a [0,1]x[0,1] grid and forgets about the actual values.

Charlotte Soneson (10:09:39): > But without it, the annotations would be a real pain

Kevin Rue-Albrecht (10:10:08): > If I get that right, it would mean figuring out the outter margins around all the panels, and the offset added by each new annotation bar, to only then convert brushes in/out of the plot. Is that an accurate description, or am I missing something?

Charlotte Soneson (10:11:33): > I guess that would be enough.

Charlotte Soneson (10:15:08): > The$rangeslot of the brush also also encodes theactualsize of the panel, so if I resize my browser window this will change. So I guess that’s not going to help here.

Aaron Lun (10:18:01): > Is there a way to do this in pure ggplot - e.g., add another raster on top of the first with the annotations?

Aaron Lun (10:18:14): > This should be pretty easy - it’s just anothergeom_rastercall, right?

Charlotte Soneson (10:18:36): > The problem there is with the color scales - you can only have one per plot. This is why I generate one plot per raster now

Aaron Lun (10:18:51): > ah fuck

Aaron Lun (10:19:03): > dammit. this would be easy with base plot.

Kevin Rue-Albrecht (10:19:47): > that, and the fact that multiple ggplot layers are laid outexactlyon top of each other. I wouldn’t know how to create multiplealignedpanels in pure ggplot

Aaron Lun (10:20:38): > What about two plots as separate UI elements, right on top of each other?

Aaron Lun (10:20:55): > Guess the gene name width would be difficult to control, thouh.

Charlotte Soneson (10:20:57): > I don’t think they would be aligned either

Charlotte Soneson (10:21:14): > Yes. And the annotation name can be longer than the gene names as well

Kevin Rue-Albrecht (10:22:25): > to be perfectly aligned, they’d need to both show the same legend, title, etc. I don’t think there’s any ‘nudge’ effect to substitute that effect of aesthetics and legends

Charlotte Soneson (10:26:21): > I agree. One option would be to go with a plotly-based thing likeiheatmapr(https://ropensci.github.io/iheatmapr/index.html). However, I think that would be considerably slower since it is completely interactive (I tried it once and it was really struggling to make a heatmap with hundreds of genes and tens of samples)

Aaron Lun (10:27:57): > Hm.

Aaron Lun (10:28:21): > Does cowplot_grid return any information at all?

Charlotte Soneson (10:34:42): > Well, it is a ggplot object, so there is information in there, but it is not structured as a regular ggplot (e.g, thegg$datais just a 2x2 matrix: (0, 1, 0, 1), instead of the plot data)

Charlotte Soneson (10:36:20): > gg$layerscontains a lot of information, but it is almost unreadable compared to a typical ggplot.

Charlotte Soneson (10:38:12): > You can get out the relative y-coordinate at which the two panels (heatmap, annotations) meet

Aaron Lun (10:39:04): > Hm. Okay.

Kevin Rue-Albrecht (10:39:07): > might be worth checking how responsive the cowplot maintainer is:Maintainer: Claus O. Wilke <wilke@austin.utexas.edu>if we can save us time answering some of our questions

Kevin Rue-Albrecht (10:40:52): > not sure how to read the latest update, but it could bePackaged: 2017-12-17that is pretty recent

Charlotte Soneson (10:47:32): > Ok, I think it is pretty clear that it iscowplot. I made a small app with two plots: one generated with onlyggplot2, one with the sameggplot2call wrapped incowplot::plot_grid:

Charlotte Soneson (10:47:41): > @Charlotte Sonesonuploaded a file:Screen Shot 2018-02-25 at 16.46.17.png - File (PNG): Screen Shot 2018-02-25 at 16.46.17.png

Kevin Rue-Albrecht (10:47:55): > -_-

Aaron Lun (10:51:40): > yep, looks fucked up to me.

Aaron Lun (11:06:35): > Also, anyone looking for an easy job can try to integrate general visual parameteres into the plotting functions, e.g., point size, font size, legend position, etc.

Kevin Rue-Albrecht (11:26:17) (in thread): > Yep, i was brainstorming that one before starting writing my usual first draft code, for once. > Are those parameters already implemented as inputs anywhere (e.g. a modal)?

Kevin Rue-Albrecht (11:28:31) (in thread): > I haven’t implemented much of the input UI so far, but I suppose I could copy-paste from another modal to get started.

Aaron Lun (11:28:55) (in thread): > All of them are in the UI now.

Kevin Rue-Albrecht (11:28:56) (in thread): > The alternative, that I’d like to avoid for many reasons, would be to have those arguments as part of theiSEE()call

Kevin Rue-Albrecht (11:29:00) (in thread): > ahhh ok cool

Aaron Lun (11:29:29) (in thread): > There are unrelated issues with the latestheat, regarding extraction of theassayNamesto use inassayColorMap; it is hard to separate them.

Kevin Rue-Albrecht (11:30:03): > btw, I just pulled again just now, but apparently my latest pull onheatearlier today caused the following error > > > app <- iSEE(sce) > Error in `[[<-`(`**tmp**`, .plotParamPanelOpen, value = FALSE) : > object '.plotParamPanelOpen' not found >

Aaron Lun (11:30:23): > That shouldn’t exist anymore.

Aaron Lun (11:30:28): > Re-install and try again.

Kevin Rue-Albrecht (11:31:06): > Cool. I was just building the latest pull again with that hope

Kevin Rue-Albrecht (11:31:18): > yep, all good now

Kevin Rue-Albrecht (11:33:57): > woooow.. nice job on the visual parameters indeed, they seem all ready to go

Kevin Rue-Albrecht (11:36:40): > Ok then. I can’t really do it right in the next couple of days, to sort out some urgent local work, but I’d say the heat map situation probably needs at least another week of work, so I’ll try to match that with some work in the evening sometime this week on both issue 143 and the visual parametes. Both pretty straightforward

Aaron Lun (11:40:30) (in thread): > Goddammit! The fact that you can give names toassayColorMapis a real pain in the arse.

Kevin Rue-Albrecht (11:40:43) (in thread): > is it?

Aaron Lun (11:41:09) (in thread): > Yes, because it means that the creation of the color scale must be able to accessseandall_memory.

Aaron Lun (11:41:28) (in thread): > Which means that I need to pass these arguments all the way down the chain, just for the colormap.

Kevin Rue-Albrecht (11:41:43) (in thread): > hmm:confused:

Aaron Lun (11:42:05) (in thread): > It would be ideal if a “rationalized” ECM guarantees that the index and name accessors are the same.

Aaron Lun (11:42:23) (in thread): > rationalized meaning that it’s matched up to the SE object.

Kevin Rue-Albrecht (11:42:48) (in thread): > eh.. hence my dream of seeing ECM integrated toSummarizedExperiment

Kevin Rue-Albrecht (11:43:04) (in thread): > (some day)

Aaron Lun (11:43:23) (in thread): > I really doubt that’s going to happen. But in the meantime, what do we do to check ECM validity?

Kevin Rue-Albrecht (11:43:42) (in thread): > I put it at the start ofiSEEI believe

Kevin Rue-Albrecht (11:43:57) (in thread): > isColorMapCompatible(colormap, se, error = TRUE)

Aaron Lun (11:44:00) (in thread): > Just piggy-back off that and make sure every entry of@assaysis of the same length asassayNames(se).

Kevin Rue-Albrecht (11:44:31) (in thread): > i was just thinking that instead/in addition to that, we could.sanitizeECM

Aaron Lun (11:44:46) (in thread): > This needs to be user-visible, therwise the code tracker won’t work.

Kevin Rue-Albrecht (11:44:57) (in thread): > maybe 1) check overall validity, 2) sanitize

Kevin Rue-Albrecht (11:47:41) (in thread): > basically, what you’d like, tell me if i’m wrong, is giving a valid ECM that may only define a subset of assays, and getting back a ’rationalized` ECM where the missing assays color maps have been filled in with their appropriate default, right?

Kevin Rue-Albrecht (11:48:11) (in thread): > (so that the number and the name return the same thing)

Aaron Lun (11:50:09) (in thread): > That would be ideal and the desired user-level behaviour anyway.

Aaron Lun (11:53:33) (in thread): > Well, I’m going to rewrite the code assuming that’s the case.

Aaron Lun (11:53:47) (in thread): > Passing so many arguments down is untenable.

Aaron Lun (12:12:40) (in thread): > In the meantime, I have “solved” the problem by adding more...arguments.

Aaron Lun (12:25:34) (in thread): > Probably just call itsynchronizeAssaysor something.

Aaron Lun (12:26:31) (in thread): > Or indeed, we can just put it all on the user. Tell them that if they plan to setassayColorMapwith names, the order of the names must be the same as the order in the SCE object.

Aaron Lun (12:27:00) (in thread): > A bit unforgiving, but hey, life is tough.

Kevin Rue-Albrecht (12:55:44) (in thread): > got abruptly offline for a bit - sorry. I’ll add thatsynchronizeAssayson my list, doesn’t sound too difficult either, I just need the time to sit down and get it done

Aaron Lun (17:42:53) (in thread): > A bit messy, but that should be enough, right?

2018-02-26

Charlotte Soneson (00:52:21) (in thread): > No, I don’t think so. You still don’t know the coordinates of the actual plot area within each panel (the coordinate you get will include margins etc)

Aaron Lun (04:28:31) (in thread): > We could probably guess the y-axis coordinates - the margins aren’t that big, right? The x-axis is harder to guess.

Charlotte Soneson (04:30:45) (in thread): > No, they are not, and there are (most of the time) not so many values on the y-axis (we only need it to the closest 0.5 resolution).

Aaron Lun (04:34:39) (in thread): > Okay. So if we restrict ourselves to y-axis selection and zooming, and combine it with brushing on the cells, then we can mostly achieve what we wanted to anyway, and pretend that it was all on purpose.

Charlotte Soneson (04:35:25) (in thread): > You mean brushing in the heatmap or in the other plots?

Aaron Lun (04:38:05) (in thread): > In other plots, to select samples in the heatmap.

Charlotte Soneson (04:40:01) (in thread): > Ok, yes, that would be easy to integrate. But in that case, isn’t it better to have the same approach for the genes (i.e., selecting in other panels, or in theselectizeInputof the heatmap)? To avoid questions about why the zoom doesn’t work both ways (and since in my opinion gene selection is already easier than cell selection due to the multiple ways of inputting them and the limited number).

Aaron Lun (04:41:34) (in thread): > Zooming is always nice, right? If you make the entire heatmap but you just want to inspect a subset, but you don’t want to have to delete the rows (and then add them back in later).

Charlotte Soneson (04:42:56) (in thread): > Yeah, sure. I will see how it works with the y-axis zooming.

Federico Marini (16:25:38): > <!channel>couple of things:

Federico Marini (16:25:55): > I did update to the current state of master for the demo server

Federico Marini (16:26:26): > got some errors, checked the log: we probably have to add two more importfrom from ggplot2

Federico Marini (16:26:46): > i.e.geom_rasterandelement_text

Federico Marini (16:27:02): > for the rest, seems to be working fine:wink:

Federico Marini (16:28:00): > this would be if we want to show off a little the link, again:http://shiny.imbei.uni-mainz.de:3838/iSEE

Federico Marini (16:28:43): > I was thinking recently on advertising one more round, this time with something like “ready to take your samples with a lasso”:stuck_out_tongue:

Kevin Rue-Albrecht (16:29:11): > “catch’em while they’re (pl)ot”

Federico Marini (16:30:01): > drop it like it’s (a heatmap) plot?

Kevin Rue-Albrecht (16:31:56): > :musical_score:“hit me with you best plot”:musical_note:(https://www.youtube.com/watch?v=0JRgHol94Xc)

Aaron Lun (16:41:08): > really digging out the classic hits, aren’t you.

Kevin Rue-Albrecht (16:41:48): > not a big fan of what’s released these days, tbh

Aaron Lun (16:43:00): > Lol

Aaron Lun (16:43:11): > Anyway, I am FINALLY going to demo this tomorrow.

Aaron Lun (16:43:18): > Unless I get hit by a bus.

Kevin Rue-Albrecht (16:43:42): > ahhh looking forward to hear more feedback

Federico Marini (16:47:50): > ismasterfine for you Aaron?

Aaron Lun (16:48:10): > I’ll be usingheat, and just do some handwaving about the features that aren’t fully integrated yet.

Federico Marini (16:49:02): > okiedokie

2018-02-27

Aaron Lun (06:15:00): > Mostly good, though these guys can’t be satisfied. It was like, ‘can you run a PCA on the subset’? And I was like, no, stop being a lazy bum.

Kevin Rue-Albrecht (06:16:06): > ah ok, so it’s not only here that people want do bioinformatics without any more programming, like at all ^^

Kevin Rue-Albrecht (06:17:51): > I was just going to say that we could work on exporting the differentplot.data… but we’re basically giving people the whole script to regenerate them all inall.coordinates

Kevin Rue-Albrecht (06:18:49): > then it’s just a matter of training users to find where each bit of information is stored, but that PCA is basically only a handful of commands away

Federico Marini (07:10:56) (in thread): > But hey, apart from the lazy bums we will never be able to satisfy entirely

Federico Marini (07:11:08) (in thread): > this means we cover pretty much all minus a few needs

Federico Marini (07:11:28) (in thread): > I think this is quite remarkable - and not just because we did it:stuck_out_tongue:

Federico Marini (07:12:10): > General consideration: maybe we could also think of Genome biology as a target for the manuscript

Federico Marini (07:12:18): > they are strongly focused on sc

Federico Marini (07:12:34): > and our friend Charlotte has pretty much an abo over there

Federico Marini (07:12:35): > :slightly_smiling_face:

Kevin Rue-Albrecht (08:23:02): > That’s true. > To be fair Oxford Bioinfo has a high IF, but it may not be worth the pain of compressing iSEE in two pages

Kevin Rue-Albrecht (08:23:16): > A larger/more flexible format may do us more good

Aaron Lun (08:24:54): > Note that there are few bugs inheat; ironing them out now.

Charlotte Soneson (08:26:46): > Anything affecting the actual heatmaps? I finally have a functional y zoom for heatmaps (in a new branch), just need to clean it up a bit and then I’ll push it.

Aaron Lun (08:30:01): > Nope.

Aaron Lun (08:39:43): > Done.

Charlotte Soneson (09:45:14): > Ok, heatmap (y-axis) zooming pushed toheatzoom

Aaron Lun (09:47:07): > Sweet, will check it out in a bit.

Aaron Lun (09:48:41): > Need to get past my neurosis about using t-tests for single-cell data first.

Charlotte Soneson (09:49:02): > Haha, you can use edgeRQLF, it is ok:slightly_smiling_face:

Aaron Lun (09:49:25): > I do pairwise comparisons between all pairs of clusters, so t-tests are undeniably fast and convenient.

Aaron Lun (09:49:40): > The issue is how to collate the results across blocking levels, i.e., batches.

Aaron Lun (09:50:16): > I’ve been getting the t-test p-values and combining them with Stouffer’s method, which seems to work okay. But I’m not 100% sure.

Charlotte Soneson (09:50:48): > Doing a t-test within each batch?

Aaron Lun (09:51:00): > Yes, within each batch, between cell types.

Aaron Lun (09:52:13): > It seems sensible, except in the edge case of one cell from each group per blocking level. In this case, linear models would be fine but it’s not possible to do t-tests. There’s also a fudge whenever there is only one cell in a group, where we switch from Welch to Student.

Aaron Lun (09:52:27): > Results in some discontinuities in behaviour that shouldn’t really be there…

Charlotte Soneson (09:52:52): > Sure. I guess you cluster everything together after some batch removal?

Aaron Lun (09:53:00): > Yeah

Aaron Lun (09:53:20): > Well, that’s the theory.

Charlotte Soneson (09:55:09): > Out of curiosity, do you get different results if you test based on the full, batch-corrected data?

Charlotte Soneson (10:00:56): > Btw, some tests are failing with the new structure of the plot commands (e.g.,cmd_listinstead ofcmd)

Aaron Lun (10:03:31): > Yes, I’m not surprised.

Kevin Rue-Albrecht (10:05:39) (in thread): > That’s probably my duty to deal with asap:slightly_smiling_face:

Aaron Lun (10:05:53): > Probably needs a look over to update everything. I had my hands full with the internal docs.

Aaron Lun (10:07:43) (in thread): > Haven’t tried that. Batch correction by regression prior to clustering has its own problems when the clusters are not split evenly across batches; and MNN correction does not (easily) give values that you can directly interpret in a DE analysis.

Aaron Lun (10:10:14) (in thread): > I guess the anticonservativeness associated with DE on the batch-corrected values would be minor at highn; assuming that the batch correction was accurate, though.

Charlotte Soneson (10:11:47) (in thread): > Yes, perhaps. And the accuracy of the batch correction will have a pretty big effect on the clustering already.

Aaron Lun (10:12:55): > Heatmap zoom looks good, but the gene names run past the color legend and through the annotations upon zoom.

Aaron Lun (10:13:42): > Also, it seems to re-render when a brush is made on the heatmap - not sure why - and it crashes when trying to import from an empty table. Both of these are mine to fix, probably.

Charlotte Soneson (10:14:10) (in thread): > Ah yes, I noticed that at some point, had forgotten about that. I am not sure why it happens, will have a look.

Charlotte Soneson (10:15:45): > The re-render is probably me setting some parameter wrong. Didn’t try the import from an empty table…but I noticed that the gene selection box empties when I ask to suggest ordering.

Aaron Lun (10:16:40): > And the brush refuses to die! Lol.

Charlotte Soneson (10:16:52): > What?

Kevin Rue-Albrecht (10:17:00): > btw, unrelated but while i think of it: a lot of people are throwing “Morpheus” (https://software.broadinstitute.org/morpheus/) at me in comparison to iSEE. I think we already mentioned it before on the channel, but I’m not sure anymore

Aaron Lun (10:17:19): > What’s its selling point?

Kevin Rue-Albrecht (10:17:57): > you can upload your data matrix in there, and dynamically browse and compute certain types of plots, including PCA I believe

Aaron Lun (10:18:23): > … or you could do that in R.

Kevin Rue-Albrecht (10:18:26): > I was put off by the UI when I first opened it, so I didn’t dig very deep

Kevin Rue-Albrecht (10:18:59): > there are a bunch of famous demo data sets to play with

Aaron Lun (10:19:31): > The heatmap is not particularly informative to me.

Aaron Lun (10:19:38): > I mean, it’s got every gene in there.

Kevin Rue-Albrecht (10:19:45): > my feeling too

Aaron Lun (10:20:41): > I think it’s just trying to make a replacement for R for people who can’t be bothered to use R.

Aaron Lun (10:20:57): > I mean, click on hierarchical clustering.

Kevin Rue-Albrecht (10:21:07): > hehehe

Kevin Rue-Albrecht (10:21:14): > I wouldn’t have put it better

Aaron Lun (10:21:40): > default distance metric is wrong - 1 - pearson’s is not a distance.

Aaron Lun (10:21:45): > (Its 0.5*sqrt(1- p))

Aaron Lun (10:22:12): > Limited set of linkage methods - and in any case, complete would be a better default.

Kevin Rue-Albrecht (10:22:25): > I just wonder what’s worse: wrong code, or wrong documentation

Aaron Lun (13:37:45): > @Charlotte Sonesonjust modifying your observer set-up a bit; heatmaps now have no brush observers, but have their own custom zoom observer.

Charlotte Soneson (13:39:03): > Great, thanks:slightly_smiling_face:

Aaron Lun (13:48:20): > As a general rule, only the point-based plots can really share the code for defining observers; heatmaps and row statistics tables need their own dedicated observer-defining code.

Aaron Lun (14:42:13): > Also note the clustering doesn’t work; we need to cache the expression submatrix, not theplot.data.

Aaron Lun (14:48:58): > Probably also need to think about downsampling - I noticed considerable delays when trying to draw a lasso on arowdata plot.

Aaron Lun (14:49:35): > I know how to do this quite efficiently by aggregating over a fine grid; the question is how to turn this on and off…

Aaron Lun (14:52:53): > @Kevin Rue-AlbrechtI suggest working off theheatzoombranch when you get back around to doing this; too many changes elsewhere.

Aaron Lun (14:55:54): > Downsampling won’t need a knn search, either, so it’ll be strictly linear, and super-fast. I’ll have to think of how to make it aware of the plot size, tho.

Kevin Rue-Albrecht (16:09:42): > Thanks for theheatzoombranch note: indeed, I was getting uncertain where to pick things from

Federico Marini (16:45:17): > To avoid confusion, I’d merge theannotation_factoryalready into master

Aaron Lun (17:43:12): > sounds sensible.

Aaron Lun (17:43:19): > Also, I HAD A VISION.

Aaron Lun (17:43:46): > We can provide support for custom plotting functions, in the same manner that we provide support for custom annotation.

Aaron Lun (17:44:31): > Power users can supply a function that accepts a SCE object and some column indices, and produces a ggplot and some coordinates.

Aaron Lun (17:45:22): > This can then integrate directly into a custom plotting panel.

Aaron Lun (17:45:55): > This would kill many birds, especially for people who can’t shut up about making PCA plots on subsets of data.

Aaron Lun (17:46:14): > They can just define their own function that takes the SCE and some column indices and makes a PCA.

Aaron Lun (17:47:31): > I’m not going to implement this before the BioC submission, but just FYI to answer any crazies who want to do weird shit.

Federico Marini (17:49:35): > prophet Aaron, I support your vision:slightly_smiling_face:

Federico Marini (17:52:05): > btw, we are almost making art with our branch network plot

Kevin Rue-Albrecht (17:57:14): > :star-struck:

Aaron Lun (18:16:38): > Could someone mergemasterback intoheatzoomand deleteannotation_factory.

Kevin Rue-Albrecht (18:21:41): > not sure whether I’m the best placed to do it, after dropping out a couple of days, but I’ve pulled both branches, got a one-line conflict in NAMESPACE when merging (> importFrom(AnnotationDbi,species)), and I’mR CMD checking now

Kevin Rue-Albrecht (18:22:53): > if all goes well, I’ll push back and deleteannotation_factory, otherwise i’ll leave it to someone who’s more up to speed with the last few commits

Kevin Rue-Albrecht (18:23:32): > @Kevin Rue-Albrechtuploaded a file:R CMD check - File (PNG): R CMD check

Kevin Rue-Albrecht (18:25:28): > is that expected? can’t see it in the latest Travis run (neitherheatzoomnormaster)

Kevin Rue-Albrecht (18:26:22): > local check:1 error | 2 warnings | 1 note. Error are expected due to unit tests out of date

Kevin Rue-Albrecht (18:26:53): > I guess i’ll push then

Aaron Lun (18:44:03): > Well, nonte of theINTERNAL_*.Rdfiles should be committed.

Aaron Lun (18:44:19): > But we should probably fix those warnings nonetheless.

2018-02-28

Federico Marini (03:38:16) (in thread): > That is my extraimportFrom, located in annotation.R

Charlotte Soneson (03:59:59): > So I think the problem with y axis ticks/labels extending below the heatmap can be solved by usingscale_y_discreteinstead ofcoord_cartesian. However, in this case we instead end up withggplotwarnings since it has to drop all NA values introduced byscale_y_discrete…Not sure which is worst…

Kevin Rue-Albrecht (04:08:03): > it’s a big “if”, but wecouldusesuppressWarnings()with care, if we’re sure enough that we’re not expecting other (helpful) warnings

Kevin Rue-Albrecht (04:11:52) (in thread): > ok, can I leave that to you then? I got a fairly large ‘raw’ R script to turn into markdown report today:sleepy:

Charlotte Soneson (04:12:20): > Sure. We could maybe wrap just the execution of the relevant (plot) commands in the app but leave it in the tracked code. Would be nicer if the problems withcoord_cartesiancould be solved somehow though:slightly_smiling_face:

Kevin Rue-Albrecht (04:14:07): > I’ve thought about this already for the.griddotplot(now.square_plot) issue withwidthandheight, but I generally prefer the bold honesty of showing all messages and warnings to users

Aaron Lun (04:29:19): > I’m happy to not use coord_cartesian, and to literally subset the expression matrix beforehand, if that helps.

Aaron Lun (04:29:51): > We’re not using the expression matrix for anything else downstream, so it should be fine.

Charlotte Soneson (04:36:56): > Yeah, seems to work too. I’ll push it in a minute.

Charlotte Soneson (04:47:14): > Ok, it’s there. One thing that we can’t do in the heatmaps is “successive zooming”, i.e. zooming in the zoomed plot, since it only records the coordinates and translates them to indices in the original matrix. Maybe this is fine, otherwise I guess we need to store the currentplot.datain memory somehow.

Aaron Lun (05:27:50): > Right… we could cache that…

Aaron Lun (05:28:15): > What do you need for this?

Charlotte Soneson (05:30:42): > So, what’s happening now is that I’m getting the y-coordinates from the selection, mapping them back to the “local” coordinates for the heatmap panel (basically 1:nbrgenes), and then subset theplot.datato to only the rows where the gene is one ofrownames(value.mat)[selected coordinates]. So I guess we’d just need to change 1:nbrgenes to 1:nbr_remaining_genes, and store the remaining gene names.

Charlotte Soneson (05:31:26): > Or maybe just store the selected rows ofvalue.matand recreate everything from there.

Aaron Lun (06:48:58): > We can store the remaining gene names in the custom zoom observer for the heatmap. In fact, I would suggest doing the translation to the genesinthe heatmap zoom observer directly, so we only need to hold on to the remaining gene names.

Aaron Lun (06:56:54): > So basically, the.zoomDatafor heatmaps would store the remaining gene names.

Aaron Lun (06:57:04): > Or the X:Y thereof.

Charlotte Soneson (09:15:07): > Yes, I think that sounds reasonable.

Aaron Lun (10:02:39): > TheiSEEinput now sanitizes the SCE object in a separate function (see.sanitize_SE_inputiniSEE-extras.R). This includes flattening nested DataFrames; adding row/column names, if absent; addingsizeFactorsandisSpikeinformation into the column- and row-level metadata, respectively; and removing non-atomic types that cannot be put in adata.framefor ggplotting.@Federico Marini, this requires us to putse_cmds(seeiSEE.R) in the code tracker so that users can reproduce the renaming (if any commands are involved).

Kevin Rue-Albrecht (10:06:15): > nice.. hadn’t thought about the non-atomic types

Aaron Lun (10:11:35): > There is a better solution that avoids redefining things, but it can’t be implemented without a few changes to the plotting functions, and I’m unwilling to do that ATM.

Aaron Lun (10:11:52): > This will do for now, I guess.

Aaron Lun (12:09:21): > ouch snowman-making induced frostbite

Federico Marini (14:58:49) (in thread): > if I got your implementation right, it is just the matter of passing that to.track_it_allas parameter, andsprintfing that too, right afterse <- se

Aaron Lun (16:05:03) (in thread): > Yes.

Federico Marini (17:22:59) (in thread): > thanks then for making my part easier:wink:

Federico Marini (17:23:36) (in thread): > it is now on heatzoom, together with the correct extra part for handling the error when we do not convert the gene id

2018-03-01

Charlotte Soneson (03:54:22): > I think the repeated zooming should work now (heatzoombranch).@Aaron Lun: since there is no brush for the heatmap I guess we no longer need the brush commands in the heatmap function (l.157-167), right? Or am I missing something? I commented them out for now and it seems to work.

Aaron Lun (04:19:37): > I thought I already deleted the brush observer.

Aaron Lun (04:20:35) (in thread): > Cool

Aaron Lun (04:42:17): > Oh, sorry, you’re talking about heatmap.R.

Aaron Lun (04:42:31): > Uh. That’s right, the box doesn’t get redrawn.

Charlotte Soneson (04:47:34): > Ok, then I’ll remove it

Aaron Lun (07:25:58): > I’ll spend this afternoon linking the heatmaps with incoming brushes.

Aaron Lun (07:26:16): > Do we always restrict?

Aaron Lun (07:26:46): > Otherwise we’d need to add a new annotation bar.

Charlotte Soneson (07:27:33): > Maybe it would be useful to have a way of just highlighting the cells (just to see where they fall in the ordering), but on the other hand you can plot the annotation in the colData plot and highlight them there.

Aaron Lun (07:29:22): > Well, it wouldn’t hurt to have coloring options, as long as you can make a new annotation bar. This may require the use of.safe_field_nameto make sure it doesn’t clash with any existing fields. I don’t think the transparency option makes much sense, unless you tell me that it’s possible. (If it is, it would make life easier for me, as I can just recycle the UI elements).

Charlotte Soneson (07:30:24): > I don’t know whether you can use alpha for the fill ingeom_raster, but I suppose that is possible

Aaron Lun (07:30:40): > Well, I’ll just do what’s easiest for me, and you can tell me what to take out afterwards.

Aaron Lun (07:31:25): > BTW,"ZoomData"will need separate documentation for heatmaps indefaults.Rd.

Aaron Lun (07:31:46): > I presume it’s always a contiguous array from X:Y?

Aaron Lun (07:32:02): > where X:Y refers to the subset of the features in the full heatmap?

Charlotte Soneson (07:32:08): > Yes, it should be.

Aaron Lun (07:32:28): > Okay - just edit the zoom section when you have the time.

Aaron Lun (08:53:59): > Brush UI added for heatmaps.

Aaron Lun (09:01:25): > Suggest using.get_brush_selection()to identify the columns.

Aaron Lun (09:01:54): > I haven’t added brush observers; will do so soon, it’s my turn to do this teaching course.

Aaron Lun (09:16:49): > joined up.

Aaron Lun (09:33:31): > @Charlotte SonesonNote that the UI is currently broken as centering/scaling commands are now checkboxes with TRUE/FALSE options.

Aaron Lun (09:33:54): > This makes more sense than radio selections, but needs some updating toheatmap.R.

Kevin Rue-Albrecht (09:35:20): > feeling so trapped in work over here:sweat:, can’t wait to join back in the fun

Charlotte Soneson (09:57:55) (in thread): > Ok, I’ll fix that.

Aaron Lun (10:34:28): > I will now reflect on downsampling.

Charlotte Soneson (11:39:33) (in thread): > I changed the heatmap code to take the logical values as input. However, the plots are not triggered to rerender if you unclick a box (or for that matter, if you reclick it again after unclicking it once).

Charlotte Soneson (12:03:50) (in thread): > Ok, turns out that it’s thereq(input[[cur_field]])in theobserveEventthat causes this.

Aaron Lun (12:11:28) (in thread): > Ah, shit.

Charlotte Soneson (12:11:49) (in thread): > I just asked it not to check this for these two inputs

Charlotte Soneson (12:12:08) (in thread): > It will not give any ugly red text if it is not selected anyway

Aaron Lun (12:13:21) (in thread): > I wonder if it renders the heatmap twice upon re-rendering.

Charlotte Soneson (12:14:07) (in thread): > Ok, why?

Aaron Lun (12:18:20) (in thread): > Thereqwas part of the protection against double-rendering, to avoid it trying to re-render the plot when the UI re-rendered via.panel_generation(e.g., when deleting/adding/moving panels). The idea was that re-rendering would initially generate aNULLin theinput, which is replaced by the actual value upon re-rendering. This would result in re-triggering of the observer and undesirable re-rendering of existing plots, and thereqwas designed to protect against that. However, I realize thatobserveEventhasignoreNULL=TRUEby default, soNULLs should never even get inside the observer. If you deleted the observerreqs iniSEE, do we get double-rendering of the heatmap (stick a print command in therenderPlotcall for heatmap to find out)? If it doesn’t, maybe we can delete allreqcalls iniSEE-main.R.

Charlotte Soneson (12:22:42) (in thread): > Regardless of thereq()in the heatmapobserveEventit renders only once at startup, and doesn’t rerender if I move the plot around. And this even withignoreNULL=FALSE(which I guess we need for the logical values to trigger rerendering

Charlotte Soneson (12:23:39) (in thread): > Well, actually it seems to work withignoreNULL=TRUEas well

Aaron Lun (12:25:29) (in thread): > Oh good.

Aaron Lun (12:26:03) (in thread): > WellignoreNULL=TRUEis the default, and we should keep it that way mostly.

Charlotte Soneson (12:26:30) (in thread): > Yes. I first thought that was the reason why the deselection didn’t trigger any update

Aaron Lun (12:26:41) (in thread): > So we can probably delete thereqcalls in the heatmap observers.

Aaron Lun (12:26:55) (in thread): > And in all observers, probably. At least forobserveEvent;observemay require some more care.

Charlotte Soneson (12:27:13) (in thread): > Ok. I’ll try this tonight.

Aaron Lun (12:29:05): > Will need to compact the UI elements to fit an extra “Downsample” checkbox.

Charlotte Soneson (14:23:25) (in thread): > Soreqdoes make a difference (albeit not for the heatmap).

Charlotte Soneson (14:24:14) (in thread): > Withreq, at startup: > > [1] "I'm here in redDimPlot" > [1] "I'm here in featExprPlot" > [1] "I'm here in colDataPlot" > [1] "I'm here in rowDataPlot" > [1] "I'm here in heatmap" > [1] "I'm here in featExprPlot" >

Charlotte Soneson (14:24:33) (in thread): > Withoutreq: > > [1] "I'm here in redDimPlot" > [1] "I'm here in featExprPlot" > [1] "I'm here in colDataPlot" > [1] "I'm here in rowDataPlot" > [1] "I'm here in heatmap" > [1] "I'm here in featExprPlot" > [1] "I'm here in featExprPlot" > [1] "I'm here in featExprPlot" > [1] "I'm here in redDimPlot" > [1] "I'm here in featExprPlot" > [1] "I'm here in colDataPlot" > [1] "I'm here in rowDataPlot" > [1] "I'm here in featExprPlot" > [1] "I'm here in featExprPlot" >

Charlotte Soneson (15:55:13): > legend position, point alpha and point size inputs are now integrated inheatzoom.

Charlotte Soneson (15:55:34): > What font size do we want to control with the Font size UI? Axis labels or titles?

Kevin Rue-Albrecht (17:01:41): > thanks for doing that Charlotte, sorry that I’m just taken away these days, or I should say evenings

Kevin Rue-Albrecht (17:04:02): > I would keep the titles to a fixed size, they should usually be fairly concise, I’d expect users to fiddle more withaxis.text(x and y), to reduce them and enlarge the plotting area

Aaron Lun (18:09:36): > Agreed

Aaron Lun (18:09:57) (in thread): > Ich bien confused.

Aaron Lun (18:10:21) (in thread): > Ah - probably due to the updateSelectize!

Aaron Lun (18:11:35) (in thread): > You can tell because the featExprPlot get hit particularly hard.

2018-03-02

Kevin Rue-Albrecht (03:03:25): > @Charlotte Soneson: i think you can markhttps://github.com/csoneson/iSEE/issues/146as completed, right? Sorry again I didn’t get to it in the last few days

Charlotte Soneson (03:04:14): > Still have to fix a couple of things (font size, default color). Then I’ll close it:slightly_smiling_face:

Kevin Rue-Albrecht (03:05:40): > Ok no worries. I’m regularly pulling the updates onheatzoom, but didn’t spin up the app to check. It’s crazy how fast we’re moving, between the four of us!

Kevin Rue-Albrecht (04:09:12): > Btw, I demo-ed iSEE to a wet-lab collaborator who happens to be used to FlowJo, and she picked up on something that I’ve mentioned in the past: the “add new [panel]” buttons at the top left are a bit counter-productive, in the meaning that there is now a number of them and they take up some space that is not frequently used. Is it possible to have a dropdown of them in the left panel? Something akin to “File > New window”?

Kevin Rue-Albrecht (04:10:12): > (except in this case it would collapse all of them into one “Add new panel” button, that would open a dropdown of buttons, one for each panel type

Aaron Lun (04:12:02): > Yes, it is possible to have the button open a modal that allows the user to choose the type of panel to add.

Kevin Rue-Albrecht (04:13:56): > Cool. I think that would unclutter the UI a bit.

Kevin Rue-Albrecht (04:23:47): > Btw, I’ll spend some time either tonight or this weekend to deal with issue ‘Additional documentation notes to fix #143’. I’ve got yet another presentation to prepare for a lab meeting on Wednesday, but I think I deserve enjoying a slice of iSEE after the past week head down in analyses:upside_down_face:

Kevin Rue-Albrecht (04:29:00): > @Federico Marini: just looking at the vignette now, I was wondering if it’d be more helpful to add the FAQ point “Copy to clipboard” directly at the top of the aceEditor modal, and removing it from the vignette.

Aaron Lun (04:29:20): > But people can just control-a….

Kevin Rue-Albrecht (04:29:31): > exacly my point

Kevin Rue-Albrecht (04:30:26): > Instead of writing it in the vignette–that people never check at the moment theyactuallyneed it–, having a short statement at the top of the modal

Kevin Rue-Albrecht (04:31:17): > ..or maybe it’s too much

Aaron Lun (04:32:52): > Oh, right. Yep.

Kevin Rue-Albrecht (04:33:16): > .. actually.. i’m just thinking now… at that point we might as well give them the button.. it takes less space than a statement:joy:

Kevin Rue-Albrecht (04:33:45): > especially if the statement has to cover multiple OSes (Command_A, Ctrl-A, whatnot-A)

Kevin Rue-Albrecht (04:39:50): > Completely independent question, I can’t help but ask at this point: how did guys strike a deal with your respective PIs to find time and freedom foriSEE? I understand that Steve got a bit overprotective of my time recently, considering that we have a few projects going on, and that it gets sometimes hard justifying to collaborators that I spend time of something that benefits me more than the group (at least on a short term). > I suppose some of you already somewhat ‘earned’ their freedom through a decent number of first-author publications, is that the trick?

Aaron Lun (05:04:06): > Yes.

Aaron Lun (05:04:21): > I pump out papers like a factory.

Aaron Lun (05:04:26): > It hurts sometimes.

Aaron Lun (05:07:36): > I also work 12/7, which helps.

Aaron Lun (05:08:21) (in thread): > Don’t want to have to set up unnecessary observers, and dependencies (xclip requires system libraries).

Aaron Lun (05:09:20): > And John (and probably Mark) are also pretty well-established, so I suppose that makes them less anxious.

Kevin Rue-Albrecht (05:11:34): > Ok, I understand there are a few factors at play. > I noticed your 12/7 indeed. I guess the fact that I invested a bit of that to help wrap up manuscript from previous positions didn’t play in my favour either.

Kevin Rue-Albrecht (05:12:25) (in thread): > Agreed. Too much pain for too little gain

Aaron Lun (05:15:48): > Despite what PIs might think, they don’t have your weekends or after-hours time. So I think it’s fair enough to work on your own projects then.

Aaron Lun (05:16:16): > I happen to work on some official projects during this time, but that’s a choice, rather than an expectation.

Kevin Rue-Albrecht (05:17:49): > Exactly, that was one of the hot topics recently, which to be honest hasn’t really been resolved to my satisfaction yet, but I think we’re moving in the right direction to find a balanced situation acceptable on both sides

Aaron Lun (05:20:56): > As long as I do something that’s useful to the group, John doesn’t really care if his name is on it.

Aaron Lun (05:21:03): > For the greater glory!

Kevin Rue-Albrecht (05:21:38): > I openly admit that software projects likeiSEEcan turn into infinite time sinks that occasionally distract from ‘main’ projects through the excitement of new features or the frustration of bug fixes, but I also think it’s only fair to have a ‘recreational’ programming hobby, more so if it makes me more familiar with concepts relevant to daily projects

Kevin Rue-Albrecht (05:21:43): > hahaha yeah

Kevin Rue-Albrecht (05:24:44): > Well Steve’s openly admits that iSEEwillbe useful to the group, but then I must also admit that he’s also absolutely right to be wary of the time that I invest in itat the expenseof projects that me and him are accountable for. > A balancing act for me and him, obviously

Aaron Lun (05:28:19): > Anyway, I’m at a teaching course right now, so I won’t be making any commits, because I amSICKof working on a mac.

Aaron Lun (05:28:22): > SICK of it.

Aaron Lun (05:28:25): > It disgusts me.

Aaron Lun (05:28:31): > I can’t write code on this shit.

Kevin Rue-Albrecht (05:28:48): > hahaha it can get painful at times

Kevin Rue-Albrecht (05:29:11): > catch up later

Federico Marini (08:36:31): > Picking up on your question on dealing with time,@Kevin Rue-Albrecht. > I can’t say I did write that much lately for my stuff, but in my case it is a mix of the following: > - the parties that are or were funding me always got back what they expected, in time -> i.e. ahead of time done, then I got some freedom > - for the fellowship I started, I have some headstart on WP1 -> but who doesn’t. > - I am as of now still taking care of some older stuff which I am happily soon delegating to my successor-me, and this plays as a bonus on managing some time in a protected way for me > - also relevant, we currently are in an interim phase for bioinformatics and/or the head of the institute. this means again lil more freedom and less tasks to take over, mostly due to this vacancy

Federico Marini (08:37:00): > plus, well, developing tools that later could save my time is a well done investiment

Federico Marini (08:37:02): > :slightly_smiling_face:

Federico Marini (08:39:45): > to be honest, sometimes I do envy you guys having strong & established bosses, which might be a constant forge of ideas

Federico Marini (08:40:15): > whereas here, well, sometimes there’S not so much, how to say…, “healthy pressure”

Federico Marini (08:41:12): > to get things out on time i.e. now or at least very soon. That’s one of the reason why I was so enthusiastically jumping in the blue and started working on this very-much-side project with you

Kevin Rue-Albrecht (09:03:37): > Thank Federico, it’s all good feedback and experience to hear back from you all.

Charlotte Soneson (09:17:59): > I don’t know if I can contribute much additional wisdom…Mark generally seems happy for us to do things that are useful to the community and to the group in general. I have plenty of collaborations as well, but as long as I deliver there I think he doesn’t care muchwhenI do what. And the knowledge gained via projects like this can be useful for other projects in the group in the future too.

Federico Marini (09:24:23): > Dear Santa,I know it is ahead of time. Please bring me an institute director that thinks like Mark.Yours sincerely,Federico

Charlotte Soneson (09:26:51): > Haha, shall I ask him if he wants to move to Mainz?

Federico Marini (09:30:19): > We have already had an australian colleague who liked it a lot here

Federico Marini (09:30:27): > if this is a prior good enough:smile:

Charlotte Soneson (09:31:30): > Mark’s Canadian, but sure…:wink::stuck_out_tongue_winking_eye:

Federico Marini (09:32:18): > ehehehe

Federico Marini (09:32:29): > it’s friday for me too:smile:

Federico Marini (09:32:47): > or I am just giving you low informative priors

Kevin Rue-Albrecht (09:42:05): > Thanks all. That’s really helpful comments to put things a bit more in perspective for me. > Without going into details, as Steve pointed out to me, I’ve been delivering on local collaborations, but I’ll have to slow down a bit on the iSEE side, if I want to pick up the pace and properly lead our own projects.

Aaron Lun (10:36:20): > I would suggest flying off the handle.

Aaron Lun (10:36:25): > I often do so.

Charlotte Soneson (11:51:17): > I pushed a commit toheatzoomthat changes the font size of axis titles and labels by multiplying default sizes (10 for text, 12 for title) by the provided font size scaling factor. For the “default” point color, I am wondering if we could useupdate_geom_defaults("point", list(colour = "red"))rather than setting the color for each plot separately (and thus keeping track of whether things are brushed or colored based on something else). I wonder where we should put it though. And it also needs to go in the code tracker.

Charlotte Soneson (11:52:22): > But I guess it has to go in the plot code, since it can be different for each panel

Charlotte Soneson (12:07:31): > Anyway, I did it like this and it seems to work

Aaron Lun (13:04:51): > Looking at it now, I’m back on a real computer.

Aaron Lun (13:07:16): > I’m thinking of changing them to text input boxes, to allow for very large or very small point/font sizes.

Aaron Lun (14:41:26): > On a different note, I’ve streamlined the row table links to avoid defining a separate choice.

Aaron Lun (14:49:19) (in thread): > Done.

Aaron Lun (14:56:45): > Also switched to text input.

Federico Marini (15:06:11): > would a numericInput be a better choice?

Federico Marini (15:06:25): > instead of plain text

Federico Marini (15:06:48): > i think this would check automatically that numbers are input

Aaron Lun (15:07:45): > Oh. Yes, that would be good.

Aaron Lun (15:07:57): > On an unrelated note, attempting to brush on the heatmap blew up my computer.

Federico Marini (15:08:03): > uh

Federico Marini (15:08:14): > I’ll try on mymac

Federico Marini (15:08:15): > :smile:

Aaron Lun (15:09:06): > boooo

Aaron Lun (15:09:15): > I hope the entire screen just explodes

Federico Marini (15:09:32): > ahah

Federico Marini (15:09:40): > screencast live to prove it:stuck_out_tongue:

Aaron Lun (15:09:42): > Make sure you press the import button.

Aaron Lun (15:10:02): > This is what happened to me; I imported the first 100 features from the row table, and then tried to brush.

Aaron Lun (15:10:57): > The brush got created but then my computer stopped.

Federico Marini (15:11:24): > whole computer or just R?

Aaron Lun (15:11:38): > Whole computer.

Aaron Lun (15:11:41): > Must have run out of memory.

Federico Marini (15:11:43): > asking because I am also writing the material for a course:stuck_out_tongue:

Federico Marini (15:11:53): > let me save first then

Aaron Lun (15:12:06): > And I’m running R command line, so there’s no Rstudio interference.

Federico Marini (15:13:04): > you mean just click and hold on the heatmap now?

Federico Marini (15:13:24): > or also actively passing somewhere else?

Aaron Lun (15:13:31): > Huh?

Aaron Lun (15:14:31): > Well, now it’s gotten even worse; it refuses to make heatmaps with more than one gene.

Aaron Lun (15:18:22): > okay… now it’s back, and brushing is okay.

Aaron Lun (15:18:27): > Not sure what the hell happened there.

Federico Marini (15:20:16): > well i’m back

Federico Marini (15:20:19): > from rebooting:smile:

Aaron Lun (15:20:24): > Oh?

Aaron Lun (15:20:28): > Did it crash?

Federico Marini (15:20:32): > ran out of mem

Aaron Lun (15:20:36): > Interesting.

Federico Marini (15:20:50): > @Federico Mariniuploaded a file:Screen Shot 2018-03-02 at 21.15.04.png - File (PNG): Screen Shot 2018-03-02 at 21.15.04.png

Aaron Lun (15:20:51): > I, on the other hand, am now fine.

Aaron Lun (15:20:58): > Hm.

Federico Marini (15:21:10): > could be due to having excel open, still.

Federico Marini (15:21:27): > ok i am joking

Aaron Lun (15:21:41): > About the rebooting?

Federico Marini (15:22:04): > no i forced it

Federico Marini (15:22:13): > but I was monitoring the ram usage

Federico Marini (15:22:16): > and it boosted up

Aaron Lun (15:22:29): > during the brushing.

Federico Marini (15:22:32): > before becoming unresponsive

Federico Marini (15:22:33): > yep

Aaron Lun (15:22:37): > Ah shit.

Aaron Lun (15:23:49): > I wonder why that is?

Federico Marini (15:25:37): > no clue

Federico Marini (15:25:52): > somehow the plot error gets too big

Aaron Lun (15:26:11): > there’s a plot error?

Federico Marini (15:26:16): > i don’t know if it would help to have an observer that just checks the object size?

Federico Marini (15:26:29): > and messages it out to console

Aaron Lun (15:26:55): > There is no way that the objects themselves are responsible for this.

Aaron Lun (15:27:02): > Nothing should even hit more than a couple of MB.

Aaron Lun (15:27:11): > ggplot, or the underlying data.

Federico Marini (15:27:36): > so where is the black hole coming from?:disappointed:

Federico Marini (15:27:58): > we don’T do anything too funky..

Aaron Lun (15:28:25): > To be clear, did you have problems when you brushed, or when you tried to zoom?

Federico Marini (15:30:03): > i managed to zoom

Federico Marini (15:30:04): > in

Federico Marini (15:30:07): > and back out

Federico Marini (15:30:20): > probably without noticing whether it was due to that

Aaron Lun (15:30:40): > okay, so when did it become unresponsive?

Federico Marini (15:31:03): > shortly after me checkign the ram usage

Aaron Lun (15:31:12): > Hm.

Federico Marini (15:31:16): > i tried also to pass the brush from another object

Aaron Lun (15:31:30): > Well, that shouldn’t be working at all yet.

Federico Marini (15:31:33): > e.g. from red dim, picking only some samples

Federico Marini (15:31:35): > indeed

Aaron Lun (15:34:11): > Okay, it’s fine for me, I’ve been tracking the memory usage and it seems okay - though it oscillates by +/- 500 MB, don’t know where that’s coming from.

Federico Marini (15:34:39): > damn

Aaron Lun (15:35:03): > We could throw in somegc()calls, maybe that would help.

Federico Marini (15:37:12): > could help, but still i am little puzzled where this could stem

Aaron Lun (15:45:22): > ¯*(ツ)*/¯

Aaron Lun (15:45:37): > @Charlotte Soneson@Kevin Rue-Albrechtdo you see issues with excessive RAM usage when brushing the heatmap?

Aaron Lun (15:46:31): > Specifically: runexample(iSEE), set up the heatmap to import from the row table, import the first 100 rows, and try brushing on the heatmp. This caused my computer to freeze and eventually caused@Federico Marini’s Rstudio to become unresponsive.

Aaron Lun (15:47:06): > Unfortunately, I can’t reproduce it anymore, so if you guys don’t see it, I’ll consider it a one-off.

Charlotte Soneson (15:49:10): > It seems to work fine for me. I see no real fluctuations in memory usage and the brushing/zooming works fine.

Charlotte Soneson (15:52:40): > What do you say about the fact that we need to have at least one annotation bar for the heatmap? I know there is a reason, but do you think it is worth trying to solve it somehow or should we keep it like this?

Aaron Lun (15:52:59): > If we didn’t have an annotation bar, how would it be sorted?

Aaron Lun (15:53:15): > It’d just be a heatmap with a whole bunch of stuff, basically.

Charlotte Soneson (15:54:08): > Sure…it just looks a bit weird that you remove the column name from theselectizeInputbut it is still there in the plot.

Aaron Lun (15:55:40): > Yes, this was what I was talking about when I was saying shiny was too laissez-faire with the NULL vs empty strings vs FALSEs in deciding whether or not an input is valid.

Aaron Lun (15:56:06): > In the case without any column names at all, we would have probably thrown avalidateerror anyway. So I didn’t see the need to work around it.

Aaron Lun (15:56:34): > I mean, what do people expect to see?

Charlotte Soneson (15:58:03): > Maybe telling the user that it is still there since you need to have at least one annotation (i.e., having avalidate) would lead to less questions of the type “It doesn’t react when I do this”

Aaron Lun (16:03:05): > Well, you can try to do it. You’ll have to remove thereqin the observers, though. This was the major problem, because the server-side selectize initializes to NULL and this was initially causing issues with double-rendering. Perhaps it’s not a problem anymore, if you make sureobserveEvent’signoreNULLis set toTRUE.

Aaron Lun (16:11:33): > Or specifically - it wasn’t initializing to NULL, it was initializing to an empty string, which was even worse as this bypassed theignoreNULL. So we’d always get double-rendering. This is actually the case when selectizeInput is empty; it doesn’t give a NULL, it gives an empty string. Real pain in the ass.

Aaron Lun (16:41:48): > Anyway, our priority is get this merged tomaster, fix all the tests, update the docs, and get this into BioC-devel.

Aaron Lun (16:42:00): > I will clean up the internal docs tomorrow - I am exhausted right now.

Kevin Rue-Albrecht (17:53:07) (in thread): > I don’t see any particular issue brushing on the heat map. Running through RStudio. What do you guys use to track memory usage?

2018-03-03

Aaron Lun (06:22:36) (in thread): > I’m going viafreeon the command line.

Kevin Rue-Albrecht (06:28:29) (in thread): > thanks

Aaron Lun (08:23:26): > I’ve merged the beast

Aaron Lun (08:26:28): > Just need to link the brushes with the heatmap now.

Aedin Culhane (09:35:16): > @Aedin Culhane has joined the channel

Federico Marini (09:37:05): > Hi@Aedin Culhane, welcome!

Aaron Lun (09:49:43): > Anyone want to do some brush linking?

Kevin Rue-Albrecht (09:50:18): > can’t do today: handling a last minute rush for a manuscript

Federico Marini (09:51:32): > wish I could. I have the following situation with girlfriend with cold, and 2/3 kinds with gastroenteritic flu

Federico Marini (09:52:14): > i.e. I will try to take care of them without getting myself sick:disappointed:

Federico Marini (09:52:37): > f*ing february - not a single full week…

Federico Marini (09:55:24): > btw

Federico Marini (09:55:41): > the memory monster happened again

Aaron Lun (09:58:09): > Dammit

Aaron Lun (09:58:47): > Can you track memory usage throughout the app?

Kevin Rue-Albrecht (10:01:42): > I recently dug up thishttps://gist.github.com/netj/526585/36515c55a3b25232bddfdd51e43cadc1a5f296deto track peak memory usage for specific command lines. > Might be hackable, if not directly applicable, to Shiny apps (especially if R is run from the command line, like Aaron does)

Kevin Rue-Albrecht (10:01:52): > @Kevin Rue-Albrechtshared a file:memusg - File (Plain Text): memusg

Aaron Lun (10:02:24): > I suspect a bit of alt-tabbing should be sufficient in this case.

Federico Marini (10:02:39): > actions taken: > > library(iSEE) > example(iSEE,ask=F) > > added the 100 feats > then, brush on heatmap just selecting. double click to zoom in. zoomed out. then asked to reorder the features, and I see the usage goes from 1.3 G to 17G

Aaron Lun (10:02:53): > YES

Aaron Lun (10:02:58): > I know what it is now.

Federico Marini (10:03:04): > alttabbing

Aaron Lun (10:03:12): > It’s because the re-ordering is fucked

Aaron Lun (10:03:23): > it’s trying to build a distance matrix on the melt’d dataframe.

Aaron Lun (10:03:27): > which is obviously huge.

Federico Marini (10:03:30): > no script, but thanks@Kevin Rue-Albrecht, it can be useful in other situations

Federico Marini (10:03:41): > :kiss:to the problem solver:slightly_smiling_face:

Federico Marini (10:03:49): > careful, I can infect:stuck_out_tongue:

Aaron Lun (10:04:06): > @Charlotte Sonesoncan you return the expression matrix from the heatmap rather than the meltedplot.data?

Federico Marini (10:04:59): > I’ll join you later - on duty with kids:slightly_smiling_face:

Charlotte Soneson (10:15:33): > Ok, I changed.make_heatMapPlotto returnvalue.mat(which is correctly scaled and centered) instead ofplot.data. I pushed to a new branchheatbrush. I can not promise that I can look at the brushing today, I need to finish another thing first.

Aaron Lun (11:42:03): > That seems to have solved the memory problem.

Aaron Lun (11:42:37): > Though not before I forgot to switch branches, resulting in another freeze-reboot cycle.

Federico Marini (14:57:49): > Confirmed, it works:wink:

Federico Marini (14:59:05): > One suggestion, if possible: can we make the features widget “scrollable”? when many genes are in it, it b oosts terribly the space taken by the widget

Kevin Rue-Albrecht (15:08:19): > not built-in that i remember.. but there may be some JavaScript magic to enable that

Aaron Lun (17:29:41): > Probably doable with some selectize options, though you’ll have to trawl through them.

Aaron Lun (17:33:02): > https://github.com/selectize/selectize.js/blob/master/docs/usage.md - Attachment (GitHub): selectize/selectize.js > selectize.js - Selectize is the hybrid of a textbox and