Giter VIP home page Giter VIP logo

project-euler's Introduction

project-euler

Freq_Commands

Frequently used Command and library Syntax #bash Bash maintains an internal hash of previously found executables in your path. In this case, it has details that at one time there was an executable at /usr/bin/siege, and reuses that path to avoid having to search again. You can also clear all hashed locations:

hash -r

##gnu parallel convert multiple sam to bam with sorting in parallel

parallel -j 16 "samtools view -bS {} | samtools sort - -o {/.}.bam" ::: `ls *.sam`

##awk subsample every Xth read

awk 'NR%(4*X)==0 {for(i=1; i<=4; i++) {getline; print}}' full_bcs.fastq > half_bcs.fastq

remove things from one file present in another https://stackoverflow.com/a/18477228/6871844

awk '{if (f==1) { r[$0] } else if (! ($0 in r)) { print $0 } } ' f=1 exclude-these.txt f=2 from-this.txt

get 5 line after every pattern line

awk '/PATTERN/ {for(i=1; i<=5; i++) {getline; print}}' inputfile

Can be used in fastq to print every 2nd read

awk ' NR%8 == 1 {for(i=1; i<=4; i++) {print;getline} }'

compare two columns from different file and get set difference

awk 'NR==FNR{c[$1]++;next};c[$1] == 0' geReads.txt txReads.txt| wc -l

python

dictionary argmax

max(stats, key=stats.get)

combination of 2

itertools.combinations(a,2)

FASTA

from pyfasta import Fasta
if __name__ == "__main__":
    f = Fasta('file.fasta')
    for contig in fasta:

##ipython Notebook:

ssh -N -f -L localhost:7777:localhost:7777 avi@feynman
ps aux | grep ssh
kill -9 <pid>
ps aux
ipython notebook --no-browser --port=7777

import pandas as pd
import numpy as np
import matplotlib as mpl
mpl.use('Agg')
import matplotlib.pyplot as plt
%matplotlib inline

##flux-simulator

./flux-simulator -t simulator -x -l -s -p ../../hg19.par
./rsem-prepare-reference --gtf ../data/bigdata/hg19/knownRef_sorted.gtf ../data/bigdata/hg19/chromFa/ ../data/bigdata/hg19/reference

##clear cache

sync && sudo purge
free && sync && sudo sh -c 'echo 3 >/proc/sys/vm/drop_caches' && free;

##extract txp->gene relation from GTF

bioawk -c gff '$feature=="transcript" {print $group}' gencode.v26.primary_assembly.annotation.gtf | awk -F ' ' '{print substr($4,2,length($4)-3) ","  substr($2,2,length($2)-3)}' - > txp2gene.tsv

project-euler's People

Contributors

hiraksarkar avatar k3yavi avatar keyavi avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.