This file contains hidden or 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
| library(CytoML) | |
| library(flowWorkspace) | |
| library(ggcyto) | |
| xmlfile <- 'gate.xml' # Gating-ML xml file generated by Cytobank | |
| fcsFiles <- list.files(pattern='.fcs', path='./FCS/', full.names=TRUE) | |
| gs <- cytobank2GatingSet(xmlfile, fcsFiles) | |
| fs <- getData(gs, "P1") # FCS file object filtered by P1 gate (live cell) | |
| P2 <- getGate(gs, "P2") # P2 gate object (EGFP gate) |
This file contains hidden or 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
| library(ggplot2) | |
| library(RColorBrewer) | |
| d <- read.csv('BC4-R1-1.fcs_spill_applied_AID_BC_Cell_P1.txt', sep='\t', header=T, skip=1) | |
| names(d) <- c('Event', 'FSC', 'SCC', 'FITC') | |
| myPalette <- colorRampPalette(rev(brewer.pal(11, "Spectral")), space="Lab") | |
| g <- ggplot(d, aes(y=FSC, x=FITC)) + | |
| geom_hex(bins=128) + |
This file contains hidden or 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
| ☕ Aichan ☕ >> python setup.py develop | |
| # pysam: cython is available - using cythonize if necessary | |
| # pysam: htslib mode is shared | |
| # pysam: HTSLIB_CONFIGURE_OPTIONS=--disable-lzma | |
| checking for gcc... gcc | |
| checking whether the C compiler works... yes | |
| checking for C compiler default output file name... a.out | |
| checking for suffix of executables... | |
| checking whether we are cross compiling... no | |
| checking for suffix of object files... o |
This file contains hidden or 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 strict; | |
| use warnings; | |
| use JSON; | |
| use Data::Dumper; | |
| my $file = shift or die('Input Data::Dumper output'); | |
| my $data = do $file; |
This file contains hidden or 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
| class BlastOut(object): | |
| def __init__(self, line): | |
| col = line.strip().split() | |
| self.col_string = line.strip() | |
| self.q = col[0] | |
| self.s = col[1] | |
| self.identity = float(col[2]) | |
| self.alignment_len = int(col[3]) | |
| self.mismatches = int(col[4]) | |
| self.gap_open = int(col[5]) |
This file contains hidden or 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
| pval.to.qual <- function(p) { | |
| return(-10*log10(p)) | |
| } | |
| qual.to.pval <- function(q) { | |
| return(10^(-q/10)) | |
| } | |
| LLR <- function(p, n, x) { |
This file contains hidden or 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
| // Soh Ishiguro | |
| import ij.ImagePlus; | |
| import ij.io.Opener; | |
| public class Main { | |
| public static ImagePlus openImage(String filepath) { | |
| Opener op = new Opener(); | |
| return op.openImage(filepath); | |
| } |
This file contains hidden or 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 random | |
| import re | |
| def generate_random_sequence(seq_length=20, n=10): | |
| """ | |
| Random sequence generator. | |
| Args: | |
| seq_length: Int #sequence length | |
| n: Int #total number of sequences |
This file contains hidden or 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
| ls | grep filename_you_want_to_move | xargs -J% cp -f % place_where_you_want |
This file contains hidden or 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 random | |
| n_code = {0: "A", 1: "T", 2: "C", 3: "G"} | |
| print "".join(map(lambda _: n_code[random.randint(0, 3)], range(0, 20))) |