--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/bin/forward-igv Tue Aug 06 10:56:16 2024 -0400
@@ -0,0 +1,7 @@
+#!/usr/bin/env bash
+
+set -euo pipefail
+
+slurm_node="$1"
+
+ssh -NAL 60151:localhost:60151 "$slurm_node"
--- a/fish/functions/pj.fish Thu Jul 18 10:09:41 2024 -0400
+++ b/fish/functions/pj.fish Tue Aug 06 10:56:16 2024 -0400
@@ -1,9 +1,9 @@
function pj -d "Prettify JSON"
if test "$argv[1]" = "-C"
# no color
- python -m json.tool
+ python3 -m json.tool
else
- python -m json.tool | pygmentize -l json
+ python3 -m json.tool | pygmentize -l json
end
end
--- a/htoprc Thu Jul 18 10:09:41 2024 -0400
+++ b/htoprc Tue Aug 06 10:56:16 2024 -0400
@@ -38,7 +38,7 @@
column_meter_modes_0=1 1 1
column_meters_1=RightCPUs2 Tasks LoadAverage Uptime
column_meter_modes_1=1 2 2 2
-tree_view=1
+tree_view=0
sort_key=39
tree_sort_key=0
sort_direction=-1
@@ -48,7 +48,7 @@
screen:Main=PID USER PRIORITY NICE M_RESIDENT STATE PERCENT_CPU PERCENT_MEM TIME Command
.sort_key=M_RESIDENT
.tree_sort_key=PID
-.tree_view=1
+.tree_view=0
.tree_view_always_by_pid=1
.sort_direction=-1
.tree_sort_direction=1
--- a/stumpwm/applications.lisp Thu Jul 18 10:09:41 2024 -0400
+++ b/stumpwm/applications.lisp Tue Aug 06 10:56:16 2024 -0400
@@ -1,5 +1,8 @@
(in-package :stumpwm-user)
+(defcommand igv () ()
+ (run-or-raise "igv" '(:class "org-broad-igv-ui-Main")))
+
(defcommand spotify () ()
(run-or-raise "spotify" '(:class "Spotify")))
--- a/stumpwm/igv.lisp Thu Jul 18 10:09:41 2024 -0400
+++ b/stumpwm/igv.lisp Tue Aug 06 10:56:16 2024 -0400
@@ -1,5 +1,23 @@
-(in-package :stumpwm-user)
+(defpackage :stumpwm-user/igv
+ (:use :cl :losh)
+ (:import-from :stumpwm :defcommand :echo)
+ (:export
+ :igv/supplementary-on
+ :igv/supplementary-off
+ :igv/group-none
+ :igv/group-selected
+ :igv/clear-read-selections
+ :igv/select-reads
+ :igv/goto
+ :igv/goto-read
+ :igv/zoom-in
+ :igv/zoom-out
+ :igv/init))
+(in-package :stumpwm-user/igv)
+
+
+;;;; Implementation -----------------------------------------------------------
(defun send-igv-command (string &key want-resp)
(usocket:with-client-socket (socket stream "127.0.0.1" 60151)
;; Do this here instead of passing :timeout above because that only sets
@@ -15,37 +33,39 @@
(defun send-igv-batch-file (path)
(send-igv-command (alexandria:read-file-into-string path)))
-(defun igv-alignment-tracks ()
+(defun alignment-tracks% ()
(str:split #\, (send-igv-command "alignmentTrackNames ," :want-resp t)))
-(defvar *igv/supplementary-alignments* t)
+(defun group% (option)
+ (send-igv-command (format nil "group ~A" (ecase option
+ ((:selected) "selected")
+ ((nil) "none")))))
-(defun igv/select-reads% ()
- (dolist (track-name (igv-alignment-tracks))
+(defun select-reads% ()
+ (dolist (track-name (alignment-tracks%))
(let ((read-names (ppcre:all-matches-as-strings
"[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"
(pbpaste))))
(send-igv-command (format nil "selectByName ~A ~A ," track-name (str:join "," read-names)))
(echo (format nil "Selected ~D read~:P." (length read-names))))))
-(defun igv/goto% ()
+(defun goto% ()
(ppcre:register-groups-bind (chr start end)
("(chr[A-Za-z0-9_]+)\\s+(\\d+)(?:\\s+)?(\\d+)?" (pbpaste))
(send-igv-command (format nil "goto ~A:~A~@[-~A~]" chr start end))))
-(defun igv/clear-read-selections% ()
- (dolist (track-name (igv-alignment-tracks))
+(defun clear-read-selections% ()
+ (dolist (track-name (alignment-tracks%))
(send-igv-command (format nil "clearSelections ~A" track-name))))
-(defcommand igv/toggle-supplementary-alignments () ()
- (callf *igv/supplementary-alignments* #'not)
- (send-igv-command
- (format nil "preference SAM.FILTER_SUPPLEMENTARY_ALIGNMENTS ~A"
- (if *igv/supplementary-alignments* "FALSE" "TRUE")))
- (echo (if *igv/supplementary-alignments*
- "Supplementary alignments now on."
- "Supplementary alignments now off.")))
+(defun zoom-in% ()
+ (send-igv-command "zoomin"))
+(defun zoom-out% ()
+ (send-igv-command "zoomin"))
+
+
+;;;; Commands -----------------------------------------------------------------
(defcommand igv/supplementary-on () ()
(send-igv-command "preference SAM.FILTER_SUPPLEMENTARY_ALIGNMENTS FALSE")
(echo "Supplementary alignments now on."))
@@ -54,19 +74,34 @@
(send-igv-command "preference SAM.FILTER_SUPPLEMENTARY_ALIGNMENTS TRUE")
(echo "Supplementary alignments now off."))
+(defcommand igv/group-none () ()
+ (group% nil))
+
+(defcommand igv/group-selected () ()
+ (group% :selected))
+
(defcommand igv/clear-read-selections () ()
- (igv/clear-read-selections%))
+ (clear-read-selections%))
(defcommand igv/select-reads () ()
- (igv/select-reads%))
+ (select-reads%))
(defcommand igv/goto () ()
- (igv/goto%))
+ (goto%))
+
+(defcommand igv/zoom-in () ()
+ (zoom-in%))
+
+(defcommand igv/foo () ()
+ (zoom-in%))
+
+(defcommand igv/zoom-out () ()
+ (zoom-out%))
(defcommand igv/goto-read () ()
- (igv/clear-read-selections%)
- (igv/goto%)
- (igv/select-reads%))
+ (clear-read-selections%)
+ (goto%)
+ (select-reads%))
(defcommand igv/init () ()
(send-igv-batch-file "/home/sjl/bin/igv.batch"))
--- a/stumpwm/key-mapping.lisp Thu Jul 18 10:09:41 2024 -0400
+++ b/stumpwm/key-mapping.lisp Tue Aug 06 10:56:16 2024 -0400
@@ -74,6 +74,8 @@
("H-5" "gselect 5")
("H-6" "gselect 6")
+
+ ("KP_Insert" "vgroups")
("KP_End" "gselect 1")
("KP_Down" "gselect 2")
("KP_Page_Down" "gselect 3")
@@ -165,11 +167,14 @@
(define-key *keymap/igv* (kbd "s") "igv/supplementary-on")
(define-key *keymap/igv* (kbd "S") "igv/supplementary-off")
+(define-key *keymap/igv* (kbd "g") "igv/group-selected")
+(define-key *keymap/igv* (kbd "G") "igv/group-none")
(define-key *keymap/igv* (kbd "r") "igv/select-reads")
(define-key *keymap/igv* (kbd "R") "igv/clear-read-selections")
-(define-key *keymap/igv* (kbd "g") "igv/goto")
-(define-key *keymap/igv* (kbd "G") "igv/goto-read")
+(define-key *keymap/igv* (kbd "l") "igv/goto")
+(define-key *keymap/igv* (kbd "L") "igv/goto-read")
(define-key *keymap/igv* (kbd "i") "igv/init")
+(define-key *keymap/igv* (kbd "H-i") "igv")
(define-top-keys ;; alternate maps
("H-i" *keymap/igv*))
@@ -179,8 +184,8 @@
;;;
;;; +----------+----------+----------+ _____
;;; | | ^ | | / \ +--------+
-;;; | | | | | | | | |
-;;; | | move | | group | | group | |
+;;; | igv | | | igv | | | | |
+;;; | z out | move | z in | group | | group | |
;;; +----------+----------+----------+ <----- | | -----> | |
;;; | | | | | | | |
;;; | move | | move | | | | |
@@ -197,6 +202,8 @@
;;; | |
;;; +---------+
(define-top-keys ;; GAMER MOUSE
+ ("s-!" "igv/zoom-out")
+ ("s-#" "igv/zoom-in")
("s-$" "move-window left")
("s-*" "move-window down")
("s-@" "move-window up")
--- a/vim/custom-dictionary.utf-8.add Thu Jul 18 10:09:41 2024 -0400
+++ b/vim/custom-dictionary.utf-8.add Tue Aug 06 10:56:16 2024 -0400
@@ -498,3 +498,21 @@
deduplicate
snakemake
repo's
+pericentromeric
+MEI
+inodes
+AluYb
+AluYa
+FASTQ
+BAM
+pseudobulk
+MEIs
+sneakernet
+CADIA
+deduplicates
+unmerged
+DCMB
+EECS
+GM12878
+WGS
+VCFs
--- a/vim/vimrc Thu Jul 18 10:09:41 2024 -0400
+++ b/vim/vimrc Tue Aug 06 10:56:16 2024 -0400
@@ -1485,6 +1485,7 @@
au FileType nginx setlocal commentstring=#\ %s
au FileType fish setlocal commentstring=#\ %s
au FileType gnuplot setlocal commentstring=#\ %s
+ au FileType singularity setlocal commentstring=#\ %s
au FileType cs setlocal commentstring=//\ %s
au FileType c setlocal commentstring=//\ %s
au FileType cpp setlocal commentstring=//\ %s