Skip to content

Instantly share code, notes, and snippets.

Daren Card darencard

Block or report user

Report or block darencard

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@darencard
darencard / ucsc_genome_track_setup.md
Last active Mar 8, 2019
Creating a UCSC Genome Track for viewing genome annotations
View ucsc_genome_track_setup.md
layout title date excerpt
posts
Visualizing Genome Annotations
2019-01-25
Creating a UCSC Genome Track for Viewing Genome Annotations

Creating a UCSC Genome Track for Viewing Genome Annotations

When creating a custom, in-house genome annotation, there is no straight-forward way to share it upon publication. NCBI does not accept and archive these, so most users just end up depositing the text files in an online repository. The UCSC Genome Browser team has fortunately come up with a decent way to share an annotation in a graphical manner, so readers can browse the assembly and annotation at some level without a lot of work.

@darencard
darencard / install_run_provean_notes.md
Created Oct 10, 2018
Notes on installing and running Provean
View install_run_provean_notes.md

Notes from work installing and running Provean to predict protein impact of variants. Provean input files were produced based on VEP output using commands below. Some trial runs were completed using a computer to understand how quickly Provean can be run in parallel to work through all annotated genes.

# running PROVEAN

# installation & dependencies
# 1. checked that blast was installed and also reinstalled cd-hit to avoid issue with certain version
# 2. installed the NCBI nr database
sudo mkdir /opt/ncbi_blast_nr_db_2018-01-29
sudo chmod 775 /opt/ncbi_blast_nr_db_2018-01-29
@darencard
darencard / phastcons_conserved_extraction.md
Created Oct 10, 2018
Commands for extracting conserved regions from PhastCons conservation tracks
View phastcons_conserved_extraction.md

Commands for extracting conserved regions from 100-way PhastCons conservation tracks. Then BLAST can be used to extract orthologous regions from genome of interest for as many regions as possible.

# download the human gene annotations
wget http://hgdownload.cse.ucsc.edu/goldenPath/hg38/database/refGene.txt.gz

# convert human gene annotations to GTF file format
zcat refGene.txt.gz | cut -f 2- | genePredToGtf -utr file stdin stdout > refGene.gtf

# extract exon features from GTF file
@darencard
darencard / basespace_quickstart.md
Created Oct 3, 2018
Installing, authenticating, and downloading using BaseSpace CLI
View basespace_quickstart.md

Installing, authenticating, and downloading using BaseSpace CLI

Installation on Mac computer

  1. Install BaseSpace CLI to $HOME/bin directory and make executable.
wget "https://api.bintray.com/content/basespace/BaseSpaceCLI-EarlyAccess-BIN/latest/\$latest/amd64-osx/bs?bt_package=latest" \
-O $HOME/bin/bs
chmod u+x $HOME/bin/bs
@darencard
darencard / entware_synology.md
Last active Aug 29, 2018
Setting up and using Entware on Synology device
View entware_synology.md
@darencard
darencard / scrolling_DNA.md
Last active Feb 26, 2018
Creating a scrolling DNA sequence visualization
View scrolling_DNA.md

Creating a scrolling DNA sequence visualization

Are you a scientist working in genomics? Have you ever given an interview to your university communications staff or local press? Did you ever find yourself wishing you could have a continuously scrolling nucleotide sequence running in the background during one of these interviews? Well look no further, because here is exactly what you need to create such an effect, which will really wow those who watch your interview.

We will create two scripts - one that creates a random string of nucleotides and one that colors each nucleotide a different color. Here is the first script, in python, named random_seq.py.

#!/usr/bin/env python

import random
@darencard
darencard / CDS_extract.md
Last active Jan 19, 2018
Extracting spliced sequences (e.g., CDS) from GFF files
View CDS_extract.md

Extracting spliced sequences (e.g., CDS) from GFF files

GFF is a common format for storing genetic feature annotations. In the case of gene annotations, subsets of elements are split over multiple lines, as things like exons and CDS features will have gaps based on the full genome sequence. Therefore, while it is easy to extract exon and CDS lines, it can be difficult to associate them together based on a parent (e.g., transcript) ID and perform downstream operations. Even extracting the full CDS sequence using a GFF file can be tricky for this reason, even though it seems trivial.

Here we'll overcome this difficulty using the gffread tool. Installation is pretty easy and is documented in the GitHub README. gffread has a lot of options, but here we'll just document one that extracts the spliced CDS for each GFF transcript (-x option). Note that you can do the same thing for exons (-w option) and can also produce the protein sequence (-y option).

Let's extra

@darencard
darencard / orthomcl_tutorial.md
Last active Jul 21, 2019
Running OrthoMCL on a set of protein annotations
View orthomcl_tutorial.md

Running OrthoMCL on a set of protein annotations from various species

OrthoMCL is the leading piece of software for inferring orthologs across several organisms. In this tutorial I will provide detailed instructions for running a set of protein annotations through OrthoMCL.

Software and Data

  1. OrthoMCL, and it's dependencies, must be installed. Detailed information on this tool and its installation can be found here. I actually used a slightly modified version of OrthoMCL that was made available by the author of the orthomcl-pipeline (see below). There isn't much details on the ways this is different from the existing OrthoMCL, but this is available here.
  2. orthmcl-pipeline must also be installed, as this is how we will automate the OrthoMCL process. Detailed information on this tool and its installation can be found [here](https
@darencard
darencard / gene_structure_stats.md
Last active Sep 5, 2019
Script to produce estimates of gene structure
View gene_structure_stats.md

Inferring the structure of gene annotations

When annotating genomes it is often desireable to know the overall structure of genes, including information like exon and intron lengths among other metrics. Here is a program genestats that will calculate such measures for a user.

#!/usr/bin/env bash

usage()
{
cat << EOF
@darencard
darencard / variant_effect_analysis.md
Last active Jan 26, 2018
Discerning the impacts of genetic variants based on genome annotations
View variant_effect_analysis.md

Variant Effect Analysis using VEP

When calling variants it can be very useful to know what impact a polymorphism might have on the biology of an organism. It is often difficult to extend a simple list of variants to specific phenotypes, but it is possible to broadly classify a variant based on its possible impact on protein coding genes (e.g., mis-sense mutations, etc.). A very useful tool for performing such an analysis is the Varient Effect Predictor (VEP) tool, which is produced by the folks at Ensembl. This tutorial will describe how to perform such an analysis on your organism of interest using variants stored in a VCF file and annotations from a GFF file.

Software and Data

  1. VEP must be installed. Detailed information on this tool and its installation can be found here.
  2. Boa_constrictor_SGA_7C_scaffolds.fa: A genome FASTA file for your organism is requi
You can’t perform that action at this time.