Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
owensgl committed Nov 28, 2024
2 parents 737b777 + 16f0cf6 commit 3d07ac6
Show file tree
Hide file tree
Showing 36 changed files with 2,522 additions and 148 deletions.
72 changes: 4 additions & 68 deletions _includes/assignments.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,84 +3,26 @@
<tr>
<th width="50">Week</th>
<th width="300">Topic</th>
<th width="50">Reading</th>
<th width="50">Questions</th>
<th width="50">Slides</th>
<th width="50">Lab</th>
<th width="50">Assignment</th>
</tr>

{% for assignment in page.assignments %}

{% for readingpage in site.pages %}
{% if readingpage.title == assignment and readingpage.element == 'reading' %}
{% capture reading_link %}{{ otherpage.url | prepend: site.baseurl }}{% endcapture %}
{% break %}
{% endif %}
{% assign language = nil %}
{% assign reading_link = nil %}
{% endfor %}

{% for lecturepage in site.pages %}
{% if lecturepage.title == assignment and lecturepage.element == 'lecture' %}
{% capture lecture_link %}{{ lecturepage.url | prepend: site.baseurl }}{% endcapture %}
{% break %}
{% endif %}
{% assign lecture_link = nil %}
{% endfor %}

{% for readingpage in site.pages %}
{% if readingpage.title == assignment and readingpage.element == 'reading' %}
{% capture reading_link %}{{ readingpage.url | prepend: site.baseurl }}{% endcapture %}
{% break %}
{% endif %}
{% assign reading_link = nil %}
{% endfor %}

{% for lessonpage in site.pages %}
{% if lessonpage.title == assignment and lessonpage.element == 'lesson' %}
{% capture lesson_link %}{{ lessonpage.url | prepend: site.baseurl }}{% endcapture %}
{% break %}
{% endif %}
{% assign lesson_link = nil %}
{% endfor %}


{% for labpage in site.pages %}
{% if labpage.title == assignment and labpage.element == 'lab' %}
{% capture lab_link %}{{ labpage.url | prepend: site.baseurl }}{% endcapture %}
{% break %}
{% endif %}
{% assign lab_link = nil %}
{% endfor %}


<tr>
<td align="right">{{ forloop.index }}</td>
<td>{{ assignment }}</td>

{% if reading_link %}
<td align="center"><a href="{{ reading_link }}" aria-label="Week {{ forloop.index }} Reading">
<i aria-hidden="true" class="fa fa-book fa-lg" ></i></a></td>
{% else %}
<td align="center"><font color="f1f1f1">
<i class="fa fa-book fa-lg"></i></font></td>
{% endif %}

{% if questions_link %}
<td align="center"><a href="{{ questions_link }}" aria-label="Week {{ forloop.index }} Questions">
<i aria-hidden="true" class="fa fa-solid fa-pen-nib fa-lg" ></i></a></td>
{% else %}
<td align="center"><font color="f1f1f1">
<i class="fa fa-solid fa-pen-nib fa-lg"></i></font></td>
{% endif %}

{% if slides_link %}
<td align="center"><a href="{{ slides_link }}" aria-label="Week {{ forloop.index }} Slides">
<i aria-hidden="true" class="fa fa-paperclip fa-lg"></i></a></td>
{% else %}
<td align="center"><font color="f1f1f1">
<i class="fa fa-paperclip fa-lg"></i></font></td>
{% endif %}



{% if lab_link %}
<td align="center"><a href="{{ lab_link }}" aria-label="Week {{ forloop.index }} Lab">
Expand All @@ -90,13 +32,7 @@
<i class="fa fa-flask fa-lg"></i></font></td>
{% endif %}

{% if assignment_link %}
<td align="center"><a href="{{ assignment_link }}" aria-label="Week {{ forloop.index }} Assignment">
<i aria-hidden="true" class="fa fa-keyboard-o fa-lg"></i></a></td>
{% else %}
<td align="center"><font color="f1f1f1">
<i class="fa fa-keyboard-o fa-lg"></i></font></td>
{% endif %}

</tr>

{% endfor %}
Expand Down
Binary file added figs/lab_10.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_10.2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_10.3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_10.4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_10.5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_10.table.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_7.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_8.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_8.2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_8.3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_8.4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_8.5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_8.6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_9.1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_9.2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_9.3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_9.4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_9.5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/lab_9.6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/private_connection.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added figs/rstudio_server.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
58 changes: 34 additions & 24 deletions labs/lab_1.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ element: lab
layout: default
---

# Introduction
## objectives
# Section 1
## Objectives

- Describe key reasons for learning shell.
- Navigate your file system using the command line.
Expand All @@ -14,7 +14,7 @@ layout: default

***

## questions
## Questions

- What is a command shell and why would I use one?
- How can I move around on my computer?
Expand Down Expand Up @@ -132,6 +132,25 @@ up until this point.
***

## Downloading files.
We first have to download the data files used in this lab. I have put them on a git repository
(which you will learn about next lecture) and you download it using this code.

```bash
[grego@indri ~]$ git clone https://github.com/owensgl/shell_data.git
```

```output
Cloning into 'shell_data'...
remote: Enumerating objects: 8, done.
remote: Counting objects: 100% (8/8), done.
remote: Compressing objects: 100% (6/6), done.
remote: Total 8 (delta 0), reused 0 (delta 0), pack-reused 0
Receiving objects: 100% (8/8), 3.71 MiB | 4.38 MiB/s, done.
```



## Navigating your file system

The part of the operating system that manages files and directories
Expand Down Expand Up @@ -359,9 +378,7 @@ using the command line shell enables us to make our workflow more efficient and
- Tab completion can reduce errors from mistyping and make work more efficient in the shell.

***

# Navigating files and directories

# Section 2

## Objectives

Expand Down Expand Up @@ -590,7 +607,7 @@ what will `ls ../backup` display?
3. `2012-12-01/ 2013-01-08/ 2013-01-27/`
4. `original pnas_final pnas_sub`

![](figs/filesystem-challenge.svg){alt='File System for Challenge Questions'}
![](../figs/filesystem-challenge.svg)


### Navigational Shortcuts
Expand Down Expand Up @@ -639,7 +656,8 @@ The commands `cd`, and `cd ~` are very useful for quickly navigating back to you

***

## objectives
# Section 3
## Objectives

- View, search within, copy, move, and rename files. Create new directories.
- Use wildcards (`*`) to perform operations on multiple files.
Expand All @@ -648,7 +666,7 @@ The commands `cd`, and `cd ~` are very useful for quickly navigating back to you

***

## questions
## Questions

- How can I view and search file contents?
- How can I create, copy and delete files and directories?
Expand Down Expand Up @@ -715,7 +733,6 @@ each result starts with `/`.

## Challenge

## Exercise

Do each of the following tasks from your current directory using a single
`ls` command for each:
Expand All @@ -731,11 +748,10 @@ Hint: The bonus question requires a Unix wildcard that we haven't talked about
yet. Try searching the internet for information about Unix wildcards to find
what you need to solve the bonus problem.

::::::::::::::: solution

## Challenge

## Exercise


`echo` is a built-in shell command that writes its arguments, like a line of text to standard output.
The `echo` command can also be used with pattern matching characters, such as wildcard characters.
Expand Down Expand Up @@ -800,7 +816,7 @@ For more information on advanced usage of `history`, read section 9.3 of

## Challenge

## Exercise


Find the line number in your history for the command that listed all the .sh
files in `/usr/bin`. Rerun that command.
Expand Down Expand Up @@ -838,7 +854,7 @@ $ cat bullkelp_001_R1.fastq



## Exercise
## Challenge

1. Print out the contents of the `~/shell_data/untrimmed_fastq/bullkelp_001_R1.fastq` file.
What is the last line of the file? What command would only print the last lines of a file?
Expand All @@ -847,12 +863,6 @@ $ cat bullkelp_001_R1.fastq
the `~/shell_data/untrimmed_fastq` directory.


## Solution

1. The last line of the file is `C:CCC::CCCCCCCC<8?6A:C28C<608'&&&,'$`.
`tail` prints the last lines of a file.
2. `cat ~/shell_data/untrimmed_fastq/*`

***

`cat` is a terrific program, but when the file is really big, it can
Expand Down Expand Up @@ -896,7 +906,7 @@ forward to the next instance of this sequence motif. If you instead type `?` and
return, you will search backwards and move up the file to previous examples of this motif.


## Exercise
## Challenge

What are the next three nucleotides (characters) after the first instance of the sequence quoted above?

Expand Down Expand Up @@ -1137,7 +1147,7 @@ characters relate to the permissions that the file owner has, the next three rel
three characters specify what other users outside of your group can do with the file. We're going to concentrate on the three positions
that deal with your permissions (as the file owner).

![](figs/rwx_figure.svg){alt='Permissions breakdown'}
![](../figs/rwx_figure.svg)

Here the three positions that relate to the file owner are `rwx`. The `r` means that you have permission to read the file, the `w`
indicates that you have permission to write to (i.e. make changes to) the file, and the third position is a `x`, indicating that you
Expand Down Expand Up @@ -1190,7 +1200,7 @@ you will be asked whether you want to override your permission settings. Be extr
or with variables (covered later). A mistaken `rm` command can delete things you don't want to be deleted.


## Exercise
## Challenge

Starting in the `shell_data/untrimmed_fastq/` directory, do the following:

Expand All @@ -1203,7 +1213,7 @@ Starting in the `shell_data/untrimmed_fastq/` directory, do the following:

***

## keypoints
## Keypoints

- You can view file contents using `less`, `cat`, `head` or `tail`.
- The commands `cp`, `mv`, and `mkdir` are useful for manipulating existing files and creating new directories.
Expand Down
Loading

0 comments on commit 3d07ac6

Please sign in to comment.