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
#!/bin/bash | |
# this is how the directory in which you run this script looks like: | |
# $ ls *bam | |
# HUZ633103.bbmap.bam HUZ634093.bbmap.bam HUZ635444.bbmap.bam HUZ636473.bbmap.bam | |
# HUZ633103.bt1.bam HUZ634093.bt1.bam HUZ635444.bt1.bam HUZ636473.bt1.bam | |
# HUZ633103.bt2.bam HUZ634093.bt2.bam HUZ635444.bt2.bam HUZ636473.bt2.bam | |
# HUZ633103.bwa.bam HUZ634093.bwa.bam HUZ635444.bwa.bam HUZ636473.bwa.bam | |
# HUZ633103.clc.bam HUZ634093.clc.bam HUZ635444.clc.bam HUZ636473.clc.bam | |
# HUZ633103.gsnap.bam HUZ634093.gsnap.bam HUZ635444.gsnap.bam HUZ636473.gsnap.bam |
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 matplotlib.colors import LinearSegmentedColormap, Normalize, rgb2hex | |
import matplotlib.cm as cm | |
class ColorMap: | |
""" | |
A simple class to get colors for a given list of values | |
Here is an example use: | |
data_dict = dict(zip(['e_%d' % e for e in range(0, 10)], range(0, 10))) |
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
meren ~/tmp $ git clone git://github.com/meren/oligotyping.git | |
Cloning into oligotyping... | |
remote: Counting objects: 71, done. | |
remote: Compressing objects: 100% (60/60), done. | |
remote: Total 71 (delta 39), reused 42 (delta 10) | |
Receiving objects: 100% (71/71), 27.87 KiB, done. | |
Resolving deltas: 100% (39/39), done. | |
meren ~/tmp $ ls | |
oligotyping |
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
>Sample-01_ReadX | |
GTTGAAAAAGTTAGTGGTGAAATCCCAGA | |
>Sample-01_ReadY | |
GTTGAAAAAGTTAGTGGTGAAATCCCAGA | |
>Sample-01_ReadZ | |
GGTGAAAAAGTTAGTGGTGAAATCCCAGA | |
>Sample-02_ReadN | |
GTTGAAAAAGTTAGTGGTGAAATCCCAGA | |
>Sample-02_ReadM | |
GTTGAAAAAGTTAGTGGTGAAATCCCAGA |
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
[general] | |
platform = 454 | |
community = Environment-01 | |
output_file = env01.fasta | |
total_sequences = 250 | |
[member type A] | |
sequence = GTTGAAAAAGTTAGTGGTGAAATCCCAGAGCTTAACTCTGGAACTGCCATTAAAACTTTTCAGCTAGAGTATGATAGAGGAAAGCAGAATTTCTAGTGTAGAGGTGAAATTCGTAGATATTAGAAAGAATACCAATTGCGAAGGCAGCTTTCTGGATCATTACTGACACTGAGGAACGAAAGCATGGGTAGCGAAGAGGA | |
ratio = 10 |
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
meren ~/tmp/sample-run $ ls mock-env-aligned-c2-s1-a1.0-A0-M0/ | |
COLORS MATRIX-COUNT.txt OLIGOS.nexus RUNINFO.cPickle | |
ENVIRONMENT.txt MATRIX-PERCENT.txt READ-DISTRIBUTION.txt RUNINFO.log | |
FIGURES/ OLIGOS.fasta RUNINFO |
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
meren ~/tmp/sample-run $ ls mock-env-aligned-c2-s1-a1.0-A0/ | |
COLORS MATRIX-PERCENT.txt RUNINFO | |
ENVIRONMENT.cPickle OLIGO-REPRESENTATIVES RUNINFO.cPickle | |
ENVIRONMENT.txt OLIGOS.fasta STACKBAR.png | |
MATRIX-COUNT.txt OLIGOS.nexus |
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
meren ~/tmp/sample-run $ ls mock-env-aligned-c2-s1-a1.0-A0-M0/OLIGO-REPRESENTATIVES | |
00000_GC 00001_AT | |
00000_GC_unique 00001_AT_unique | |
00000_GC_unique.png 00001_AT_unique.png | |
00000_GC_unique_BLAST.cPickle 00001_AT_unique_BLAST.cPickle | |
00000_GC_unique_BLAST.xml 00001_AT_unique_BLAST.xml | |
00000_GC_unique_color_per_column.cPickle 00001_AT_unique_color_per_column.cPickle | |
00000_GC_unique_distribution.cPickle 00001_AT_unique_distribution.cPickle | |
00000_GC_unique_entropy 00001_AT_unique_entropy |
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
#!/bin/bash | |
# | |
# put this in a directory where your FASTQ files reside. when you run it, it will | |
# generate an 'analyses' directory, in which you will find your perfect V6 reads | |
# per FASTQ file. | |
# | |
# (this script assumes that your FASTQ files are interleaved). | |
# |
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
import sys | |
matrix = open(sys.argv[1]) | |
env = open(sys.argv[1] + '.ENV', 'w') | |
matrix.readline() | |
samples = matrix.readline().strip().split('\t')[1:] | |
for line in matrix.readlines(): | |
fields = line.strip().split('\t') |