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
Hello Python Discord |
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
[tool.poetry] | |
name = "issue" | |
version = "0.1.0" | |
description = "" | |
authors = ["Fin Swimmer"] | |
exclude = ["issue/exclude_me.py"] | |
[tool.poetry.dependencies] | |
python = "^3.6" |
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
rule target: | |
input: | |
bam = "SRR7526729_realigned.bam", | |
index = "SRR7526729_realigned.bam.bai" | |
rule umi_extract: | |
input: | |
R1 = "../{sample}_1.fastq.gz", | |
R2 = "../{sample}_2.fastq.gz" | |
output: |
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
kmer | count | |
---|---|---|
AAA | 72422544 | |
AAC | 43498931 | |
AAG | 58395299 | |
AAT | 72538809 | |
ACA | 54592537 | |
ACC | 33744272 | |
ACG | 7570315 | |
ACT | 47439444 | |
AGA | 60011989 |
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 python | |
# -*- coding: utf-8 -*- | |
from __future__ import print_function | |
import sys | |
from argparse import ArgumentParser | |
def main(): | |
args = get_args() |
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
configfile: | |
"config.json" | |
SAMPLES, = glob_wildcards(config['data']+"/{id}_L001_R1_001.fastq.gz") | |
rule move: | |
input: | |
bam = expand("{sample}.final.bam", sample=SAMPLES), | |
bai = expand("{sample}.final.bai", sample=SAMPLES) | |
params: |
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
configfile: | |
"config.json" | |
SAMPLES, = glob_wildcards(config['data']+"/{id}_L001_R1_001.fastq.gz") | |
rule move: | |
input: | |
bam = expand("{sample}.final.bam", sample=SAMPLES), | |
bai = expand("{sample}.final.bai", sample=SAMPLES) | |
params: |
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 Bio import AlignIO | |
def column(alignment): | |
'''Generator for getting list of characters in each column in the alignment''' | |
for i in range(alignment.get_alignment_length()): | |
c = [] | |
for record in alignment: | |
c.append(record.seq[i]) |
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
ENSPFO Poecilia formosa (Amazon molly) | |
ENSJJA Jaculus jaculus (Lesser Egyptian jerboa) | |
ENSPCO Propithecus coquereli (Coquerel's sifaka) | |
ENSNGA Nannospalax galili (Upper Galilee mountains blind mole rat) | |
ENSMFA Macaca fascicularis (Crab-eating macaque) | |
ENSMIC Microcebus murinus (Mouse Lemur) | |
MGP_CAROLIEiJ_ Mus caroli (Ryukyu mouse) | |
ENSFAL Ficedula albicollis (Flycatcher) | |
ENSCLA Chinchilla lanigera (Long-tailed chinchilla) | |
ENSPEM Peromyscus maniculatus bairdii (Northern American deer mouse) |
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 | |
from Bio import SeqIO | |
def mismatch(seq1, seq2): | |
index = [] | |
for i, (s1, s2) in enumerate(zip(seq1, seq2)): | |
if s1 != s2: | |
index.append(i) |
NewerOlder