UofUEpiBio / PHS7045-advanced-programming

https://uofuepibio.github.io/PHS7045-advanced-programming
3 stars 4 forks source link

Week 9 #17

Closed chipmanj closed 1 month ago

chipmanj commented 1 year ago

@UofUEpiBio/phs7045-2023

Lecture notes from Brett Milash: https://home.chpc.utah.edu/~u0424091/installing_r_packages.pdf

gvegayon commented 1 year ago
library(igraph)
library(netplot)
library(igraphdata)

data("UKfaculty")

col <- V(UKfaculty)$Group

set.seed(1231)
ans <- nplot(
  UKfaculty,
  vertex.color = col,
  edge.line.breaks = 20,
  # edge.curvature = pi/3 * 4,
  bg.col = "black"
  )

png("netplotfig.png", width = 1024, height = 780)
print(ans)
dev.off()

saveRDS(ans, file="netplotfig.rds")
gvegayon commented 1 year ago
#!/bin/sh
#SBATCH --job-name=netplot-example
#SBATCH --account=notchpeak-shared-short
#SBATCH --partition=notchpeak-shared-short
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --time=00:05:00
#SBATCH --output=netplotlog.log

# Loading R
module load R/4.1.3

#  Running the script
Rscript --vanilla netplot-example.R
Daniel-K-Addo commented 1 year ago

Submission of log file for Lab 9 netplotlog.log

hyejung0 commented 1 year ago

@chipmanj Can you share the scp code for copying CHPC file into the local computer?

chipmanj commented 1 year ago

@chipmanj Can you share the scp code for copying CHPC file into the local computer?

@hyejung0 The scp code is: scp [location/file] [new location].

For example, scp 01*.R [uid]@kingspeak.chpc.utah.edu:~/examples/ would transfer all files that begin with 01 and end in .R from my current directory to the ~/examples directory.

You could also call scp [uid]@kingspeak.chpc.utah.edu:~/examples/01*.R . to transfer all files that begin with 01 and end in .R from the ~/examples directory to the current directory (.).

For more details, call man scp from the command line to see the manual on scp.