Skip to content

Commit

Permalink
markdown source builds
Browse files Browse the repository at this point in the history
Auto-generated via {sandpaper}
Source  : 77a83ba
Branch  : main
Author  : Kevin Rue-Albrecht <kevinrue67@gmail.com>
Time    : 2024-05-15 12:41:43 +0000
Message : Adjust chapter about genomic ranges (#85)

* fix typo

* rephrase

* mention getter functions

* update challenge
  • Loading branch information
actions-user committed May 15, 2024
1 parent 80f3629 commit 52c79b7
Show file tree
Hide file tree
Showing 4 changed files with 1,351 additions and 6 deletions.
68 changes: 63 additions & 5 deletions 07-genomic-ranges.md
Original file line number Diff line number Diff line change
Expand Up @@ -537,8 +537,8 @@ GRanges object with 2 ranges and 0 metadata columns:
seqinfo: 2 sequences from an unspecified genome; no seqlengths
```

Finally, the examples above also demonstrate that `GRanges` objects include a
component called `seqinfo`, which is occasionally used to store information
Finally, the example above also demonstrate that `GRanges` objects include a
component called `seqinfo`, which can be used to store information
about each sequence that may be represented in the `seqnames` component.
In the latest example above, we have not provide any information about any
sequence.
Expand Down Expand Up @@ -587,6 +587,61 @@ GRanges object with 2 ranges and 0 metadata columns:
seqinfo: 2 sequences (1 circular) from homo_sapiens genome
```

The start and end positions of the individual ranges as well as the width of
every interval can be extracted as numeric vector using the functions `start()`,
`end()` and `width()`, respectively.


``` r
start(demo_granges2)
```

``` output
[1] 10 20
```

``` r
end(demo_granges2)
```

``` output
[1] 25 35
```

``` r
width(demo_granges2)
```

``` output
[1] 16 16
```

The sequence names and strand information can be extracted using the functions
`seqnames()` and `strand()`, respectively.


``` r
seqnames(demo_granges2)
```

``` output
factor-Rle of length 2 with 2 runs
Lengths: 1 1
Values : chr1 chr2
Levels(2): chr1 chr2
```

``` r
strand(demo_granges2)
```

``` output
factor-Rle of length 2 with 2 runs
Lengths: 1 1
Values : + -
Levels(3): + - *
```

### Metadata on GRanges

Similarly to `IRanges`, metadata can be passed directly to the `GRanges`
Expand Down Expand Up @@ -877,10 +932,13 @@ ENST00000676189 ENST00000676319 ENST00000676397

Importantly, the function `lengths()` (with a final `s`) demonstrated above
is different from the function `length()` (without `s`).
The former is meant to be used on list objects, while the latter is meant
to be used on vectors.
The former is meant to be used on list objects, returning a vector giving the
length of each element in the list; while the latter returns a single numeric
scalar giving the length of the list itself (i.e., the number of elements
in the list).

What does `length(actb_exons_by_transcript)` return, and why?
What does `length(actb_exons_by_transcript)` return, and what does this
number represent biologically?

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

Expand Down
85 changes: 85 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
#------------------------------------------------------------
# Values for this lesson.
#------------------------------------------------------------

# Which carpentry is this (swc, dc, lc, or cp)?
# swc: Software Carpentry
# dc: Data Carpentry
# lc: Library Carpentry
# cp: Carpentries (to use for instructor training for instance)
# incubator: The Carpentries Incubator
carpentry: 'incubator'

# Overall title for pages.
title: 'The Bioconductor project'

# Date the lesson was created (YYYY-MM-DD, this is empty by default)
created: '2020-09-14'

# Comma-separated list of keywords for the lesson
keywords: 'software, data, lesson, The Carpentries'

# Life cycle stage of the lesson
# possible values: pre-alpha, alpha, beta, stable
life_cycle: 'pre-alpha'

# License of the lesson
license: 'CC-BY 4.0'

# Link to the source repository for this lesson
source: 'https://github.com/carpentries-incubator/bioc-project'

# Default branch of your lesson
branch: 'main'

# Who to contact if there are any issues
contact: 'team@carpentries.org'

# Navigation ------------------------------------------------
#
# Use the following menu items to specify the order of
# individual pages in each dropdown section. Leave blank to
# include all pages in the folder.
#
# Example -------------
#
# episodes:
# - introduction.md
# - first-steps.md
#
# learners:
# - setup.md
#
# instructors:
# - instructor-notes.md
#
# profiles:
# - one-learner.md
# - another-learner.md

# Order of episodes in your lesson
episodes:
- 01-setup.Rmd
- 02-introduction-to-bioconductor.Rmd
- 03-installing-bioconductor.Rmd
- 04-getting-help.Rmd
- 05-s4.Rmd
- 06-biological-sequences.Rmd
- 07-genomic-ranges.Rmd

# Information for Learners
learners:

# Information for Instructors
instructors:

# Learner Profiles
profiles:

# Customisation ---------------------------------------------
#
# This space below is where custom yaml items (e.g. pinning
# sandpaper and varnish versions) should live


url: 'https://carpentries-incubator.github.io/bioc-project'
2 changes: 1 addition & 1 deletion md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"episodes/04-getting-help.Rmd" "ef95b83e2cf1db86786c9b8ff971684b" "site/built/04-getting-help.md" "2024-05-15"
"episodes/05-s4.Rmd" "e97eed7893703ad409eb937d95e357b1" "site/built/05-s4.md" "2024-05-15"
"episodes/06-biological-sequences.Rmd" "da5a66034d8bba99de8f7746584a7c95" "site/built/06-biological-sequences.md" "2024-05-15"
"episodes/07-genomic-ranges.Rmd" "1678d11e207781b420e36810e603000b" "site/built/07-genomic-ranges.md" "2024-05-15"
"episodes/07-genomic-ranges.Rmd" "a88d289c2db16b377d3af09a9c896086" "site/built/07-genomic-ranges.md" "2024-05-15"
"instructors/instructor-notes.md" "a848c3b904c16f0840e7ec385de58d7d" "site/built/instructor-notes.md" "2024-05-15"
"learners/discuss.md" "90557a59d285aa7ce2a8adfc5799b1a8" "site/built/discuss.md" "2024-05-15"
"learners/reference.md" "c0ac274d8350e94fbaef3e28b458c7f4" "site/built/reference.md" "2024-05-15"
Expand Down
Loading

0 comments on commit 52c79b7

Please sign in to comment.