Managing My Bibliography in NCBI on linux: Use Chromium, not Firefox unfortunately

Several times I’ve tried to resolve conflicts and otherwise edit “My Bibliography” on NIH National Library of Medicine’s NCBI system (www.ncbi.nlm.nih.gov) using Firefox on Debian linux. It has never worked. It just sits there, indicating that it is doing something, but never proceeding, confirming, or finishing.
Today I tried it on on Chromium from Debian’s repository and it worked quickly without a problem. I wish web programmers, especially those in public institutions would not use browser specific features, locking users into particular platforms.

mbsync error “Unable to recover from UIDVALIDITY change.”

Today received this error when checking my UW email with mbsync:

Error: channel uwoutlook, far side box Calendar: Unable to recover from UIDVALIDITY change.

I searched a bit for an easy solution and it seemed that the consensus was to delete your local email repository and resynchronize with the server. I’m just noting here that deleting the offending directory in your local email repository appeared to work. For example, above it is the “Calendar” directory under my “uwoutlook” mail directory (channel, in mbsync).

For me, that was a much smaller resynchronization job.

Debian linux

mbsync --version
isync 1.4.4

[mu4e] Found mu version 1.11.22

UW BIRCH JIG-Quant (Year 3)

We are getting ready to resume our BIRCH JIG-Quant meetings. If you are an early career HIV and/or mental health researcher (post-doc, research or academic faculty) and you’d like to participate in a monthly meeting focused on quantitative methods (broadly defined), please get in touch.

Getting UW Outlook 365 OAUTH2 to work with emacs, mu4e, mbsync, and msmtp

* Editing on 11/28/2022 to update some items and make some corrections.

I prefer reading email in Emacs with mu4e. My password authentication recently stopped working for sending and receiving email. After several hours of trial and error and putting together different web search results, I have it working again.

The crux of the matter is that Outlook 365 no longer accepted username and password to log in and now requires an OAUTH2 token or key or phrase. There are explanations on the web about how and why this change, but I haven’t read them.

Here’s an outline of what I did:

  1.  started with installing oauth2ms
    1. needed to install it on my Debian unstable system
    2. rather than install via python packages via pip, I installed the following packages via the Debian package manager: python3-pyxdg, python3-msal, python3-gnupg. Note you also need working gnupg.
    3. to test, I ran the pip command and the messages confirmed the packages were already present
    4. then you copy oauth2ms to a directory in your $PATH
  2. oauthms needs a persistent environment variable pointing to the $XDG config directory. On my machine, that is $HOME/.config. I put XDG_CONFIG_HOME=$HOME/.config in my .profile and then my .xsessionrc, but it did not show up as defined in my xterm. So I finally put it in .bashrc and it does. I read the Debian documentation about where to put it, but clearly I’m missing something because my understanding is that .profile is where it belongs.
  3. Next, I created and “Azure Active Directory App” for mbsync (and msmtp, but turns out I don’t need it yet). For this, I followed instructions, as I am completely unfamiliar with Azure and other MS software and platforms.
    1. The instructions I followed were:
    2. A challenge for me in doing this was that I am unfamiliar with much of the language in the MS docs.
    3. A catch occurred during the Azure App registrations. You create an Authentication procedure. Therein, you specify what kind of app you need to authenticate. I thought it was a desktop app, because I’m working on a desktop. However, it turned out to need to be a Web app, as someone in Stack Exchange discovered.
    4. When you create a secret key for your app, you need to save the value of the key immediately. The documents say you will never be able to see it again.
    5. Also, the redirect URI should not end in a backslash. Following the instructions on the oauth2ms steps.org file, I used https://localhost:portnumber/getToken. One does include the final backslash in the config.json file needed next.
    6. The steps.org document also lists permissions to add, which I did.
    7. I saw references on the web to using another, already available authentication app, like Thunderbird’s, but I didnt’ try to figure that out (yet).
  4. While creating the Azure app, I also filled in the skeleton of the oauth2ms config.json file.
    1. The CLIENT_ID and TENANT_ID values are available on the Overview for the Azure app you created.
    2. The CLIENT_SECRET is the value of the secret key you created and saved.
    3. Because this is theoretically important, I changed the file mode of config.json to be owner-only readable and writeable (chmod go-r). However, it is stored in clear-text. Perhaps down the road, I’ll find a way to used gnupg to encrypt and decrypt the file, so it is stored securely. This is done in the mutt instructions for Outlook and OAUTH2, so I assume it is readily done here too.
  5. I believe at this point, running oauth2ms at the command prompt should work. I got errors several times, leading to the above list of reading and steps, but eventually, I got a very long string of characters with no error messages.
  6. For mbsync to work, one needs a/the SASL OAUTH2 authentication plugin. The steps.org file points to it. ADDED 11/28: There is a Debian package (at least unstable) with an OAUTH2 mechanism. It is called libsasl2-modules-kdexoauth2.
    1. You do have to build this from source, using autogen, configure, and make.
    2. The problem in this step is that on Debian SASL plugins are stored in /usr/lib/x86_64-linux-gnu, whereas the source code puts it in /usr/lib. This didn’t work and OAUTH2 was not an available authentication method.
    3. As pointed out in this Stack Exchange post, I had to edit the Makefile to install to the right place. I tried using ./configure -libdir=/usr/lib/x86_64-linux-gnu/ , but it didn’t work, so I am missing something. Specifically, it was the pkglibdir line in the Makefile.
    4. Once the OAUTH2 plugin was put in the right place, it worked.
    5. To verify, I installed the Debian package sasl2-bin, which includes saslpluginviewer. Before it was properly installed, XOAUTH2 did not show up. Once it was properly installed, it did.
  7. The last step I did, was to change the authentication code in my .mbsync file, as shown in the steps.org document:
...
PassCmd oauth2ms
AuthMechs XOAUTH2
...

Then I tried it and mbsync worked! There was much rejoicing.

I did not need to edit my .msmtprc file for MS SMTP, because I was directed to a local UW SMTP server to use instead. However, upon making this change, I had to change a variable for mu4e. When using MS SMTP, sent mail were automatically saved to “Sent Items”, so I told mu4e to delete them:

(setq mu4e-sent-messages-behavior 'delete)

however, using a local SMTP server, I had to save them myself:

(setq mu4e-sent-messages-behavior 'sent)

where 'sent is defined as mu4e-sent-folder "/mailbox/Sent Items". Your toplevel account directory may not be called mailbox.

I wrote this quickly to try to remember it. Comments, edits, corrections or clarifications welcome. If you need to do this, I hope you find it helpful.

UW BIRCH Quantitative Methods Junior Investigator Group (JIG-Quant)

The UW BIRCH Methods Core is seeking a handful of early-stage investigators (at least post-doc/MD) to join a junior investigator group focused on quantitative research methods (JIG-Quant) for behavioral research around HIV and mental health. Please forward this notice to any early stage investigators who may be interested. Following the structure of the CFAR Behavioral Science Core’s successful junior investigator group, we will focus on quantitative methods topics to assist participants in securing funding, actively publishing, and otherwise advancing in their careers.

The group will meet monthly (day and time, to be determined). JIG-Quant members are asked to commit to one year of attendance, presenting at least once, and supporting others who present their work. Meetings shall be informal and all levels of expertise are welcome. A willingness to discuss, question, and learn together will be expected. Work at any stage is welcome.

We endorse an anti-racist and decolonizing approach to research and in our practices. We seek to provide a supportive environment for BIPOC investigators and members of underrepresented groups.

A major benefit of the group is building an interdisciplinary network of peers at the UW working in similar areas who are available for support and collaboration.

Interested investigators should send 1) a biosketch or CV, and 2) a brief statement about one’s research plans and methods interests to Brian Flaherty: bxf4@u.washington.edu. Please CC UW BIRCH as well (uwbirch@uw.edu).

Bias incident reporting tool

As so many have noted, the COVID-19 pandemic and protests following George Floyd’s murder have highlighted inequalities and systemic racism across the US. Consistent with this, many people are more actively working to correct these many wrongs.

One common theme of anti-racism work (i.e., acknowledging  one’s own and actively working to correct structural and systemic racism) begins with oneself, for example, acknowledging and owning white privilege (I am white and I have it.) and striving to identify over-sights, assumptions, racist ideas, etc. in one’s own thinking. Accepting the fact that I likely harbor racist thoughts, opinions, expectations, etc., identifying them, and then dealing with them are important anti-racist steps.

Another aspect of this work is giving more power to those who have historically lacked it. Simultaneously, people identifying systemic or individual biases (or worse) need to be protected from backlash or punishment by those in power. To this end, I have created an anonymous and confidential bias incident reporting tool that I will share with my classes every quarter. It is anonymous, so a student may feel safer reporting something that I did or happened in a class I am teaching. I also hope that by identifying this on my syllabus, as well as mentioning it in class, it will signal that I genuinely want this feedback for my self-improvement, as well as improvement of my classes or class climate.

I used UW’s WebQ, as UW-IT suggested when I asked for an anonymous emailer, but I presume any online survey system could also do this. I first made it confidential. When you create a WebQ survey, this was the first question. I have also asked a student to answer and I checked their results. There was no name or username connected, only a six or eight digit number. I will test it again and verify that it isn’t a person’s student ID number!

It is only a one question survey and here’s my text:

I am sorry something happened that brought you here. Please explain what happened, any response(s), and any additional information you wish. If I (Brian Flaherty) behaved in a biased manner or my class structure is biased, I will read your comments and try to correct things. Remember, this is a confidential survey. I do not have access to your identity. Thank you for your time.

The response is simply a text box. I will get an email every time something is submitted. I also gave respondents the ability to see all the other responses submitted, as well as the ability to edit a response later. They can also submit multiple times.

I’d love to never get a response and hope that that was indirect evidence that I was not committing or creating many biased events or biasing contexts. But if I do receive responses, I’ll work to improve.

Happy to receive suggestions to improve this. Thanks.

Screenshot of a bias incident reporting tool
Screenshot of a bias incident reporting tool on UW WebQ.

RE Summer PSYCH 315 – B term (4 weeks)

Just sent this email to the currently enrolled students in my upcoming PSYCH 315 course this summer. Posting here in case others are thinking of taking it. Want to be clear about the pace.

Good morning this Fri. of Finals week,

I hope you are each done with your spring quarter, that it went reasonably well, and that you enjoy the slice of time before our B term 315 class starts. This is not to say that our 315 class won’t be enjoyable. It can be, especially if you like stats., but it is an atypical sort of immersive, all-encompassing, no time for anything else sort of enjoyment. Like virtual reality, only not virtual and all stats. More on that below.

The first thing to say is that we are using a very nice textbook. It is in its 7th edition. You can purchase the new edition, but you can also use an older edition. There should be lots of 6th editions floating around. The authors are King, Rosopa, and Minium.

Now back to the immersive nature of our four week 315 class. If you already know all this material well, then what I say here doesn’t apply to you. But if you are learning stats. for the first time and you don’t want to take this class again, try to clear your schedule during our class. I understand you may have work or other responsibilities you cannot simply pause. Try to pause anything optional. I don’t recommend taking other intensive courses during this four weeks. I would also get ready to have a diminished to non-existent social life during these four weeks. The pace is intense and if you get behind, catching up is difficult.

There will be support to help you learn this material. We have a wonderful graduate TA, and I believe we’ll have a handful of undergrad. peer tutors, as well. Thus assistance outside of class as needed should be available.

Take care! Enjoy June and see you toward the end of July,