Good measure to download sequence from NCBI based on acc or gi number

cat file_with_ids.txt | while read p; do echo $p; esearch -db nucleotide -query $p | efetch -format fasta > $p.fasta; done;

    cat ginumber.txt| while read p; do echo $p; efetch -db nucleotide -id $p -format gb > $p.gbk; done;   shenzy@SZYENVS:~/work/zhongshan/viru[……]

Read more

[…]

fasta2nexus by R script

Workspace loaded from ~/.RData] > setwd("/home/shenzy/work/beast/51samples") > library(seqinr) > data=read.fasta("51strain_core_gene_alignment.aln") > library(ape)  Attaching package: ‘ape’ The following objects are masked from ‘package:seqinr’: as.alignment, consensus[......]

Read more

[…]

change the font size of leaf nodes when generating phylogenetic trees using Bio.Phylo.draw()

axes : matplotlib/pylab axes If a valid matplotlib.axes.Axes instance, the phylogram is plotted in that Axes. By default (None), a new figure is created.

This means that you can load your own axes with your size of choice. For example

import matplotlib import matplotlib.pyplot as plt from Bio im[......]

Read more

[…]

How to find large files with size in Linux? find and du command example

One of the common problem while working in UNIX is to find large files to free some space. Suppose, your file system is full and you are receiving an alert to remove spaces or if your host is run out of space and your server is not starting up, the first thing you do is find top 10 largest files and[……]

Read more

[…]

Chip-seq流程报告(转贴)

一、摘要 实验旨在了解Chip-seq的基本原理。通过模仿文献《Targeting super enhancer associated oncogenes in oesophageal squamous cell carcinoma》的流程,学会利用NCBI和EBI数据库下载数据,熟悉Linux下的基本操作,并使用R语言画图,用Python或者shell写脚本进行基本的数据处理,通过FastQC、Bowtie、Macs、samtools、ROSE等软件进行数据处理,并对预测结果进行分析讨论。 二、材料

1、硬件平台

处理器:Intel(R) Core(TM)i7-4710MQ[……]

Read more

[…]

Dating a node with BEAST2.0

For details, read http://beast2.cs.auckland.ac.nz/index.php/Main_Page and http://beast2.cs.auckland.ac.nz/index.php/FAQ . For any problem, do not hesitate to browse through the list of questions on the BEAST forum https://groups.google.com/forum/#!forum/beast-users .

Exercise description

[……]

Read more

[…]

Mapping reads with bwa and bowtie

In this tutorial, we’re going to take a set of Illumina reads from an inbred Drosophila melanogaster line, and map them back to the reference genome. (After these steps, we could do things like generate a list of SNPs at which this line differs from the reference strain, or generate a genome sequenc[……]

Read more

[…]

Python Subprocess returns non-zero exit status only in cron

You should try to capture stderr in addition to stdout so that you can find out exactly why the program is failing (assuming it does indeed print some errors for you)
 cmd = ['/path/to/casperjs', '/path/to/doSomething.js', 'args'] response = subprocess.check_output(cmd,[......]

Read more

[…]

Apache CGI Script Can Cannot Overwrite a File in a Directory it has full permissions

I ran into this due to the “SELinux” configuration. If SELinux is running, you need to explictly enable the ability for Apache to write to files. To use this, you also need to set additional permissions on those directories and files for which you are granting write access. To determine if SE[……]

Read more

[…]

shell脚本-定时执行任务

在linux系统下,我们经常需要定时执行一些固定的任务,比如说服务器每天定时将数据进行备份,但是又不希望人工来操作,因为这样不仅效率低而且又浪费人力资源,我们可以使用shell脚本来配合crontab命令实现定时任务

centos重启命令:

  • reboot
  • shutdown -r now 立刻重启(root用户使用)
  • shutdown -r 10 过10分钟自动重启(root用户使用)
  • shutdown -r 20:35 在时间为20:35时候重启(root用户使用)

Linux centos关机命令:

  • halt 立刻关机
  • poweroff 立刻关机
  • [……]

Read more

[…]