Below commands all work.
df -h /yourDisk
df -h
df -k
Source:
https://docs.oracle.com/cd/E23823_01/html/817-0403/spmonitor-6.html
Below commands all work.
df -h /yourDisk
df -h
df -k
Source:
https://docs.oracle.com/cd/E23823_01/html/817-0403/spmonitor-6.html
Check running servers:
jupyter notebook list
Stop running servers (both works):
jupyter notebook stop
kill $(pgrep jupyter)
Source:
https://github.com/jupyter/notebook/issues/1950
https://stackoverflow.com/questions/10162707/how-to-close-ipython-notebook-properly/32745046#32745046
Step 1: Open terminal
Step 2:
cd ~
touch .Renviron
open .Renviron
Step 3: Save the following as the first line of .Renviron
:
R_MAX_VSIZE=100Gb
As noted in the source,
Sys.setenv('R_MAX_VSIZE'=32000000000)
only works in command line, doesn’t work for Rstudio
Source:
https://stackoverflow.com/questions/51295402/r-on-macos-error-vector-memory-exhausted-limit-reached
Both works.
#SBATCH --exclude=node[01-09]
#SBATCH --exclude=node01,node02,node03,node04,node05,node07,node08,node09,node10
Compress multiple files:
tar -czvf name-of-archive.tar.gz file1 file2 folder1 folder2
Compress folder:
tar -czvf name-of-archive.tar.gz /path/to/directory-or-file
Compress a folder while excluding some files:
tar -czvf archive.tar.gz /home/ubuntu --exclude=*.mp4
Decompress tar.gz file:
tar -xzvf archive.tar.gz
tar -xzvf archive.tar.gz -C targetDir
tar -xzvf archive.tar.gz -directory targetDir
Souce:
https://www.howtogeek.com/248780/how-to-compress-and-extract-files-using-the-tar-command-on-linux/
Compress files:
zip output.zip file1 file2 file3
Compress folder:
zip -r output.zip folder1 folder2
Decompress zip file:
unzip output.zip # unzip into the directory where the zip file exists
unzip output.zip -d folder1 # unzip into folder from where the zip file exists
Source:
https://www.cyberciti.biz/faq/how-to-create-a-zip-file-in-unix/
du -sh directory_name
Source:
https://unix.stackexchange.com/questions/3019/how-can-i-calculate-the-size-of-a-directory/3021
In Jupyter Notebook, use the below command within the notebook to install packages in the current working environment. This is specifically useful when you are working in the notebook, and need to install new packages to the matching python version you are using.
!{sys.executable} -m pip install XXX
In Mac: control+c
There are two ways to lift-over bigwig files from one genome build to another. One is using CrossMap
or step by step as below. (CrossMap
is almost the same to the break down steps)
CrossMap method: (taking from hg19 to hg38 as example)
pip install CrossMap
CrossMap.py bigwig hg19ToHg38.over.chain input.bw output.bw
genome liftover chain files can be downloaded here: http://hgdownload.cse.ucsc.edu/goldenpath/hg19/liftOver/ (change according to your needs)
Step by step method: (bw –> bedGraph –> liftover –> bw)
bigWigToBedGraph input.bw input.bedGraph
liftOver input.bedGraph hg19ToHg38.over.chain input_hg38.bedgraph unMapped
fetchChromSizes hg38 > hg38.chrom.sizes
LC_COLLATE=C sort -k1,1 -k2,2n input_hg38.bedgraph > input_hg38.sorted.bedgraph
bedGraphToBigWig input_hg38.sorted.bedgraph hg38.chrom.sizes output.bw
bigWigToBedGraph
,liftOver
,fetchChromSizes
,bedGraphToBigWig
are all UCSC utilities which can be installed from here: http://hgdownload.soe.ucsc.edu/downloads.html#utilities_downloads
Source:
http://hgdownload.soe.ucsc.edu/downloads.html#utilities_downloads
http://crossmap.sourceforge.net/#