SACNAS National Conference, Long Beach Convention Center, Room 103C

Oct 12, 2016

8:30 am - 5:00 pm

Instructors: Joslynn Lee, Camille Avestruz

General Information

Adapted from Software Carpentry and Data Carpentry workshops, which are for any researcher who has data they want to analyze with no prior computational experience is required. This abridged hands-on workshop teaches basic concepts, skills and tools for working more effectively with data.

In short form of the traditional 2-day workshops, we will cover The Unix Shell, Programming with R, and Programming with Python. Participants should bring their laptops and plan to participate actively. By the end of the workshop learners should be able to more effectively manage and analyze data and be able to apply the tools and approaches directly to their ongoing research.

Who: This free workshop has a morning and afternoon session. The workshop is aimed at undergraduate, graduate students, faculty and other researchers.

Where: 300 E Ocean Blvd, Long Beach, CA 90802. Get directions with OpenStreetMap or Google Maps.

Requirements: Participants must bring a laptop with a Mac, Linux, or Windows operating sytem (not a tablet, Chromebook, etc.) that they have administrative privileges on. They should have a few specific software packages installed (listed below). They are also required to abide by Software and Data Carpentry's Code of Conduct.

Contact: Please mail Joslynn Lee jolee@cshl.edu for more information.


Surveys

Please be sure to complete these surveys before and after the workshop.

Pre-workshop Survey

Post-workshop Survey

Preliminary Schedule

Morning Session

08:30 Overview of Agenda and Instructors
08:40 Introduction to CyVerse Infrastructure
08:55 Introduction to Software & Data Carpentry and Reproducible Research
09:00 Scaling data skills training for researchers
09:05 Good Enough Practices
09:15 Computer check for software/downloads
09:30-11:30 The Unix Shell
09:30 Introducing the Shell
09:35 Navigating Files and Directories
09:50 Working with Files and Directories
10:05 Pipes and Filters
10:30 Break
10:40 Loops
10:55 Shell Scripts
11:10 Finding Things
11:30-12:00 Wrap-up
04:30 Large scale computing + CyVerse
11:50 Questions

Afternoon Session

01:30 Overview of Agenda and Instructors
01:35 Introduction to CyVerse Infrastructure
01:40 Introduction to Software & Data Carpentry and Reproducible Research
01:45 Why I became an instructor?
01:50 Computer check for software/downloads
02:00-3:15 Programming with R
02:00 Intro to RStudio and Data Analysis
03:15 Break
03:30 Programming with Python
03:30-4:30 Demo Notebook
04:30-5:00 Wrap-up
04:30 Large scale computing + CyVerse
04:50 Questions

Syllabus

The Unix Shell

  • Files and directories
  • History and tab completion
  • Pipes and redirection
  • Looping over files
  • Creating and running shell scripts
  • Finding things
  • Reference...

Programming in Python

Programming in R


Setup

To participate in this workshop, you will need working copies of the described software. Please make sure to install everything (or at least to download the installers) before the start of your workshop. Participants should bring and use their own laptops to insure the proper setup of tools for an efficient workflow once you leave the workshop. In addition, an up-to-date web browser is necessary.

We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.

The Bash Shell

Bash is a commonly-used shell that gives you the power to do simple tasks more quickly.

Windows

Video Tutorial
  1. Download the Git for Windows installer.
  2. Run the installer and follow the steps bellow:
    1. Click on "Next".
    2. Click on "Next".
    3. Keep "Use Git from the Windows Command Prompt" selected and click on "Next". If you forgot to do this programs that you need for the workshop will not work properly. If this happens rerun the installer and select the appropriate option.
    4. Click on "Next".
    5. Keep "Checkout Windows-style, commit Unix-style line endings" selected and click on "Next".
    6. Keep "Use Windows' default console window" selected and click on "Next".
    7. Click on "Install".
    8. Click on "Finish".
  3. If your "HOME" environment variable is not set (or you don't know what this is):
    1. Open command prompt (Open Start Menu then type cmd and press [Enter])
    2. Type the following line into the command prompt window exactly as shown:

      setx HOME "%USERPROFILE%"

    3. Press [Enter], you should see SUCCESS: Specified value was saved.
    4. Quit command prompt by typing exit then pressing [Enter]

This will provide you with both Git and Bash in the Git Bash program.

Mac OS X

The default shell in all versions of Mac OS X is Bash, so no need to install anything. You access Bash from the Terminal (found in /Applications/Utilities). See the Git installation video tutorial for an example on how to open the Terminal. You may want to keep Terminal in your dock for this workshop.

Linux

The default shell is usually Bash, but if your machine is set up differently you can run it by opening a terminal and typing bash. There is no need to install anything.

Text Editor

When you're writing code, it's nice to have a text editor that is optimized for writing code, with features like automatic color-coding of key words. The default text editor on Mac OS X and Linux is usually set to Vim, which is not famous for being intuitive. if you accidentally find yourself stuck in it, try typing the escape key, followed by :q! (colon, lower-case 'q', exclamation mark), then hitting Return to return to the shell.

Windows

Video Tutorial

nano is a basic editor and the default that instructors use in the workshop. To install it, download the Software Carpentry Windows installer and double click on the file to run it. This installer requires an active internet connection.

Others editors that you can use are Notepad++ or Sublime Text. Be aware that you must add its installation directory to your system path. Please ask your instructor to help you do this.

Mac OS X

nano is a basic editor and the default that instructors use in the workshop. See the Git installation video tutorial for an example on how to open nano. It should be pre-installed.

Others editors that you can use are Text Wrangler or Sublime Text.

Linux

nano is a basic editor and the default that instructors use in the workshop. It should be pre-installed.

Others editors that you can use are Gedit, Kate or Sublime Text.

Python

Python is a popular language for scientific computing, and great for general-purpose programming as well. Installing all of its scientific packages individually can be a bit difficult, so we recommend Anaconda, an all-in-one installer.

Regardless of how you choose to install it, please make sure you install Python version 3.x (e.g., 3.4 is fine).

We will teach Python using the IPython notebook, a programming environment that runs in a web browser. For this to work you will need a reasonably up-to-date browser. The current versions of the Chrome, Safari and Firefox browsers are all supported (some older browsers, including Internet Explorer version 9 and below, are not).

Windows

Video Tutorial
  1. Open http://continuum.io/downloads with your web browser.
  2. Download the Python 3 installer for Windows.
  3. Install Python 3 using all of the defaults for installation except make sure to check Make Anaconda the default Python.

Mac OS X

Video Tutorial
  1. Open http://continuum.io/downloads with your web browser.
  2. Download the Python 3 installer for OS X.
  3. Install Python 3 using all of the defaults for installation.
  4. To run the Jupyter notebook:
    jupyter notebook

Linux

  1. Open http://continuum.io/downloads with your web browser.
  2. Download the Python 3 installer for Linux.
  3. Install Python 3 using all of the defaults for installation. (Installation requires using the shell. If you aren't comfortable doing the installation yourself stop here and request help at the workshop.)
  4. Open a terminal window.
  5. Type
    bash Anaconda3-
    and then press tab. The name of the file you just downloaded should appear.
  6. Press enter. You will follow the text-only prompts. When there is a colon at the bottom of the screen press the down arrow to move down through the text. Type yes and press enter to approve the license. Press enter to approve the default location for the files. Type yes and press enter to prepend Anaconda to your PATH (this makes the Anaconda distribution the default Python).

R and R Studio

Windows

  1. Download R 3.3.1 from here
  2. Click on the first link: Download R 3.3.1 for Windows
  3. Run the .exe file that was just downloaded
  4. Go to the RStudio Download page
  5. Under Installers select RStudio 0.99.903 - Windows Vista/7/8/10
  6. Double click the file to install it.
  7. Once it's installed, open RStudio to make sure it works and you don't get any error messages.

Mac OS X

  1. Download R for (Mac) OS X here
  2. Select the .pkg file for the version of OS X that you have and the file will download.
  3. Double click on the file that was downloaded and R will install.
  4. Go to the RStudio Download page
  5. Under Installers select RStudio 0.99.903 - Mac OS X 10.6+ (64-bit)
  6. Once it's downloaded, double click the file to install it.
  7. Once it's installed, open RStudio to make sure it works and you don't get any error messages.

Linux

  1. R is available through most Linux package managers. You can download the binary files for your distribution from CRAN. Or you can use your package manager (e.g. for Debian/Ubuntu run sudo apt-get install r-base and for Fedora run sudo yum install R)
  2. Go to the RStudio Download page
  3. Under Installers select the version for your distribution.
  4. Once it's downloaded, double click the file to install it.
  5. Once it's installed, open RStudio to make sure it works and you don't get any error messages.

We maintain a list of common issues that occur during installation as a reference for instructors that may be useful on the Configuration Problems and Solutions wiki page.