Skip to content

Instantly share code, notes, and snippets.

View allgenesconsidered's full-sized avatar

Michael Olvera allgenesconsidered

View GitHub Profile
@allgenesconsidered
allgenesconsidered / example.R
Created December 12, 2017 18:56
Generate dendrogram from samples
library("SNPRelate")
snpgdsVCF2GDS(vcf.fn = "~/Desktop/dom_neg_genes_chr11_only/domneg_filtered_variants.vcf", out.fn = "~/Desktop/my.gds")
snpgdsSummary("~/Desktop/my.gds")
genofile <- openfn.gds("~/Desktop/my.gds")
ibs.hc <- snpgdsHCluster(snpgdsIBS(genofile, num.thread=2))
rv <- snpgdsCutTree(ibs.hc)
## Generate combine files
# freq_1 <- read.delim('filter_for_common/dat_vc/BEST1_very_common.tsv', header = T, stringsAsFactors = F)
# freq_1$gene <- 'BEST1'
# freq_2 <- read.delim('filter_for_common/dat_vc/HSPB1_very_common.tsv', header = T, stringsAsFactors = F)
# freq_2$gene <- 'HSPB1'
# freq_3 <- read.delim('filter_for_common/dat_vc/MFN2_very_common.tsv', header = T, stringsAsFactors = F)
# freq_3$gene <- 'MFN2'
# freq_4 <- read.delim('filter_for_common/dat_vc/NEFL_very_common.tsv', header = T, stringsAsFactors = F)
# freq_4$gene <- 'NEFL'
#
@allgenesconsidered
allgenesconsidered / example.sh
Last active September 26, 2023 08:04
Pulling more reference files from the GATK servers
#!/bin/bash
cd /data/home/molvera/res
wget -c ftp://gsapubftp-anonymous@ftp.broadinstitute.org/bundle/hg38/1000G_phase1.snps.high_confidence.hg38.vcf.gz
wget -c ftp://gsapubftp-anonymous@ftp.broadinstitute.org/bundle/hg38/1000G_phase1.snps.high_confidence.hg38.vcf.gz.tbi
wget -c ftp://gsapubftp-anonymous@ftp.broadinstitute.org/bundle/hg38/Mills_and_1000G_gold_standard.indels.hg38.vcf.gz
wget -c ftp://gsapubftp-anonymous@ftp.broadinstitute.org/bundle/hg38/Mills_and_1000G_gold_standard.indels.hg38.vcf.gz.tbi
wget -c ftp://gsapubftp-anonymous@ftp.broadinstitute.org/bundle/hg38/hapmap_3.3.hg38.vcf.gz
wget -c ftp://gsapubftp-anonymous@ftp.broadinstitute.org/bundle/hg38/hapmap_3.3.hg38.vcf.gz.tbi
#!/bin/bash
PI="/data/home/molvera/opt"
cd /data/home/molvera/wgs-patient-data
for SAMPLE in "MN_P1_S5" "NF_P1_S1" "BT_P1_S2"
do
java -Xmx10g -jar $PI/picard.jar SortSam\
INPUT=./sam/$SAMPLE.sam\
@allgenesconsidered
allgenesconsidered / 1_bwa_mem_example_COMMENTED.sh
Last active November 22, 2017 17:29
1_bwa_mem_example.sh
#!/bin/bash
cd /data/home/molvera/wgs-patient-data # Change the directory to my project directory
REF=/data/home/molvera/opt/hg38/Homo_sapiens_assembly38.fasta # Create a variable assigning REF to the absolute location
# of my .fasta reference file.
bwa index $REF # The first part of BWA, which indexes your reference file. You only need to do this once per fasta reference.
for samp in "BT_P1_S2" "BT_P3_S9" "BT_P6_S7" "BT_P7_S6" "BT_P8_S3" # For loop through my 5 samples.
<% @todos.each do |todo| %>
<li>
YOUR CODE HERE
</li>
<% end %>
<div class="card">
<h2>Edit this todo...</h2>
<form action="#">
<input class="text-input" name="description" type="text" value="<%= @todo.description %>">
<input class="text-input" name="pomodoro_estimate" type="number" value="<%= @todo.pomodoro_estimate %>">
<input class="button add-new-todo-button" type="submit" value="Edit todo">
<a href="/todo/index" class="simple-link">Go back...</a>
</form>
</div>
<h2>Add a new todo...</h2>
<form action="#">
<input class="text-input" id="new-todo-description" name="description" type="text" placeholder="Add a new todo...">
<input class="text-input" id="new-pomodoro-estimate" name="pomodoro_estimate" type="number" placeholder="Pomodoro estimate...">
<input class="button" id="add-new-todo-button" type="submit" value="Add todo">
</form>
<li>
<input type="checkbox" name=""/>
<a href="show/1">Make the curriculum</a>
<span class="pomodoro-estimate small-pomodoro-estimate">4 Pomodoros</span>
</li>
def show
todo_id = params[:id]
if todo_id == '1'
@todo_description = "Make the curriculum"
@todo_pomodoro_estimate = 4
elsif todo_id == '2'
@todo_description = "Buy workshop supplies"
@todo_pomodoro_estimate = 3