ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCF_000208745.1_Criollo_cocoa_genome_V2 ftp://ftp.ncbi.nlm.nih.gov/genomes/all/GCA_000208745.2_Criollo_cocoa_genome_V2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use warnings;use strict; | |
my ($header,$sequence); | |
$header = <>; | |
chomp $header; | |
while(my $line = <>){ | |
chomp $line; | |
if($line =~ /^>/){ |
SAM and BAM filtering one-liners
@author: David Fredman, [email protected] (sans poly-A tail)
@dependencies: http://sourceforge.net/projects/bamtools/ and http://samtools.sourceforge.net/
Please extend with additional/faster/better solutions via a pull request!
BWA mapping (using piping for minimal disk I/O)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From [this tutorial](https://www.tecmint.com/clear-ram-memory-cache-buffer-and-swap-space-on-linux/) | |
sync; echo 1 > /proc/sys/vm/drop_caches | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create a new fasta file given a fasta file and list of sequence names | |
# - outputting the long_name does/did not seem to work properly in the faidx script that is packaged with pyfaidx | |
from pyfaidx import * | |
# read fasta file | |
fa = Fasta('test.fa') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
From [this stackover post](https://stackoverflow.com/questions/2418527/sql-server-query-to-get-the-list-of-columns-in-a-table-along-with-data-types-no) | |
*/ | |
SELECT | |
c.name 'Column Name', | |
t.Name 'Data type', | |
c.max_length 'Max Length', | |
c.precision , | |
c.scale , |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Derived from https://towardsdatascience.com/how-to-fine-tune-gpt-2-for-text-generation-ae2ea53bc272 | |
import os | |
import pandas as pd | |
from transformers import GPT2LMHeadModel, GPT2Tokenizer | |
import numpy as np | |
import random | |
import torch | |
from torch.utils.data import Dataset, DataLoader |
OlderNewer