This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from: https://researchcomputing.princeton.edu/support/knowledge-base/rrstudio | |
9. How can I solve the following error? | |
Installing package into ‘/home/ceisgrub/R/x86_64-redhat-linux-gnu-library/3.6’ | |
(as ‘lib’ is unspecified) | |
--- Please select a CRAN mirror for use in this session --- | |
Error in structure(.External(.C_dotTclObjv, objv), class = "tclObj") : | |
[tcl] grab failed: window not viewable. | |
R is trying to display a list of mirrors via X11 forwarding so try unsetting DISPLAY before starting R: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function sacctRun() { | |
sacct --format="user,jobid,jobname,node,state,ExitCode,start,end,maxrss" \ | |
| grep -v "COMPLETE\|FAIL\|CANCEL\|OUT_OF_ME" \ | |
| awk '$2 != "batch" && $2 != "extern" {print}' | |
} | |
get_maint_time () { | |
maint_start=$(scontrol show -u root reservation \ | |
| perl -pe 's/\n/#/g' \ | |
| perl -pe 's/#ReservationName=/\n/g' \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# open powershell | |
Get-FileHash file_here.txt -Algorithm MD5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# record command line inputs/outputs | |
script logfile.txt | |
# type stuff | |
exit | |
## Log is saved in logfile.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#capture groups | |
sed \ | |
-E 's/.+(GA.+CA).+/stuff_\1_stuff/' \ | |
/reference/homo_sapiens/hg19/ucsc_assembly/illumina_download/Sequence/WholeGenomeFasta/genome.fa \ | |
| head | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ml picard/2.21.6-Java-11.0.2 | |
java -jar \ | |
$EBROOTPICARD/picard.jar \ | |
ValidateSamFile \ | |
I=/gpfs0/scratch/mvc002/testTwoTumors/split_sams_2//S0149_1.sam \ | |
MODE=VERBOSE | |
# Can optionally include ignore arguments to ignore specific error types | |
IGNORE=MISSING_TAG_NM \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test <- parallel::mclapply(as.list(0:5), function(x) { | |
print(x) | |
if (x == 0) { | |
stop("something didn't work for ", x) | |
} | |
return(1) | |
}) | |
if (any(lapply(test, function(x) class(x) == "try-error") |> unlist())) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
If you get the error about [error] Barcode out of bounds during cellranger mkfastq: | |
Have to run bcl2fastq directly like I did in R0063 | |
https://kb.10xgenomics.com/hc/en-us/articles/360038857411--error-Barcode-out-of-bounds-I1-0-14-or-I2-0-16- | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Create new account environment variable on your windows machine named DISPLAY with value of localhost:0.0 | |
Make sure mobaxterm is running (or whatever X11 you want) | |
In your "Configure SSH Hosts" menu, put this under each Host: | |
ForwardX11 yes | |
ForwardX11Trusted yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# compare the contents of the commands slot between test and combined_data | |
cmp_seurat_cmds <- function(sobj_a, | |
sobj_b, | |
sobj_a_name = "sobj_a", | |
sobj_b_name = "sobj_b", | |
verbose = FALSE) { | |
# Making a list here as not all of the contents of the arguments fit into a tibble | |
# A list can accept any data type | |
diff_list <- list() | |
for (step_ran in names(sobj_a@commands)) { |
NewerOlder