Schumer lab: Introduction to command line

From OpenWetWare
Jump to navigationJump to search

Command line tutorials

If you aren't familiar with basic command line, that is the first thing you should learn. Here are some tutorials compiled by the Wilson-Sayres lab to use to get started:

https://github.com/SexChrLab/BioinformaticsIntroduction/

Here is an introduction to the most commonly used unix commands:

https://www.cs.swarthmore.edu/~newhall/unixhelp/howto_unixCommands.html

Text editor

Using emacs

You'll need to be familiar with a text editor you can use from the command line for lots of on-the-fly applications. Most people in the lab use emacs but vim is also a good option. Here are the basics:

create a new file with emacs:

type the following, then press enter

emacs my_job.sh

Then you can type or copy paste as needed. See Submitting slurm jobs for what you might want to put in your file my_job.sh.

you can save changes with: clt+x+s

you can quit with: clt+x+c

emacs can also be used to edit an existing file. The usage is the same:

emacs my_existing_file.txt

you can navigate this file with up/down and left/right arrows

you can skip to the end with: esc+shift+>

you can skip the beginning with: esc+shift+<

you can search using: clt+s

Here are some e-macs command cheat sheets:

https://www.cs.colostate.edu/helpdocs/emacs.html

R tutorials

R is also extremely important for most things we do in the lab. If you haven't used R before, here are some tutorials to get started.

https://cran.r-project.org/doc/manuals/R-intro.html

http://evomics.org/learning/programming/introduction-to-r/

R can also be used interactively on Sherlock. See section 1.5 of the R tutorial [[1]] and Lab group on Sherlock

Git version control

Use the lab GitHub to backup your code and for version control! It's already installed on Sherlock. See here for more information: Schumer lab: Lab github