Skip to main content

Posts

Linux Tips and Tricks

Collected from CBRC wiki: Original source: http://dragon.cbrc.kaust.edu.sa/wiki/index.php/Linux_Tips_and_Tricks Linux Tips and Tricks Jump to: navigation , search Contents 1 Useful commands 1.1 General commands 1.2 Directories processing 1.3 Files processing 1.4 Find/Replace 1.5 Processes 2 File System /Disk Management 2.1 Disk space report 2.2 Resizing Shared Memory (/dev/shm) 2.3 Resizing partitions CentOS 2.4 Disk crash recovery 2.5 Mounting WebDAV Share 2.5.1 Installing and configuring WebDAV for non-sudo on Ubuntu Useful commands General commands find Linux version $ cat / etc / issue Directories processing $ # recursively delete backup files $ find . / -name '*~' | xargs rm   $ # Process all files in a directory $ ls dir_path /* .xml | xargs -n 1 MyProcessingProgram   $ # gzip/guznip directory: $ tar czvf myfile.tar.gz mydir /* $ tar xzvf filename.tar.gz ( or: tar x...

GIT tutorial

Tutorial:  http://gitready.com/ http://blog.osteele.com/posts/2008/05/my-git-workflow/ Basic structure Image from: From : http://blog.osteele.com/posts/2008/05/my-git-workflow/ Following tips are collected from CBRC git (Thanks to John and Craig) Original LInk: http://dragon.cbrc.kaust.edu.sa/wiki/index.php/Cbrcgit Cbrcgit Jump to: navigation , search Contents 1 What is git 2 CBRC git server 3 Quick start 4 Using git 5 Creating a new remote repository 6 Creating a new local git repository 7 Project repository 8 See also What is git http://en.wikipedia.org/wiki/Git_%28software%29 Git is a free distributed revision control, or software source code management, project with an emphasis on being fast. Git was initially designed and developed by Linus Torvalds for Linux kernel development. Every Git working directory is a full-fledged repository with complete history and full revision tracking capabilities, n...

MicroRNA database : Mirbase naming convension ; Target Database

MirTarBase V 4.5   http://mirtarbase.mbc.nctu.edu.tw/php/download.php?ver=4.5&opt=show For human, It has  targets for 596 mature microRNA from mirBase. Mirbase 20 Number of precursor micorRNA:  1871 ID , 1870 Name (mir-511 has two id) Number of mature micorRNA:   2794 ID , 2576 Name. ID  Each precursor and mature microRNA has unique ID. If you work on ID that would be fine.  Name  -- > ID P recursor microRNA For each primary ID  there is 1 primary name, except one case hsa-mir-511. This name is common for two primary transcript chr10    .    miRNA_primary_transcript    17887107    17887193    .    +    .    ID=MI0003127;Alias=MI0003127;Name=hsa-mir-511 chr10    .    miRNA_primary_transcript    18134036    18134122    ...

GO Term analysis

1. Repository for annotation of  GO ID against genes download file (gene_association.goa_human.gz) from link: http://geneontology.org/gene-associations/gene_association.goa_human.gz http://geneontology.org/page/download-annotations 2. How to extract GO names/description from database from GO ID Option 1 : use the file   http://purl.obolibrary.org/obo/go.obo from   http://geneontology.org/page/download-ontology Option 2 :  use R package # load the GO library  library(GO.db)   write.table( goterms, sep="\t", file="goterms.txt") 3. How to do get all GO terms for a gene Option 1: Use the annotation database [BEST option you can dowload updated file and parse it based on UNIPROT ACC No ] http://geneontology.org/gene-associations/gene_association.goa_human.gz Option 2 : R package Ontologyzer [It can be used to show annotation at child and parent level also , scrool down below to check command] http://compbio.chari...
How to clone a repository 1. Go to the repository 2. click Fork 3. In local machine , type following command (her tanviralambd   = user name) git clone https://github.com/tanviralambd/intermine.git

JAVA directory operation : List files in a folder , copy files and folder creation

List files in a folder  import java.io.*; public static Vector listFiles_Files_Dir(String absPathFolder)     {         Vector vectAllFiles = new Vector ();         File folder = new File(absPathFolder);         File[] listOfFiles = folder.listFiles();         for (int i = 0; i < listOfFiles.length; i++) {             if (listOfFiles[i].isFile()) {                                 System.out.println("File: " + listOfFiles[i].getName());                 vectAllFiles.add(listOfFiles[i].getName() );                          ...

ngsplot ngs.plot tutorial

#!/bin/sh # #SBATCH --job-name=testJob #SBATCH --time=24:00:00 #SBATCH --nodes=1 #SBATCH --ntasks=1 #SBATCH --partition=dragon-default #SBATCH --ntasks-per-node=1 #SBATCH --mem=8192 # # Display all variables set by slurm env | grep "^SLURM" | sort ## run with command: sbatch NGSPLOT_test.sh #module load gcc/4.7.4 #module load  compilers-extra #module load samtools/1.1 #module load bwtool/1.0 module purge module load slurm module load gcc/4.7.4 module load R/3.1.1 module load ngsplot dataDir="/home/alamt/HMCan_test/" workDir=/home/alamt/NGSPLOT/ cd $workDir hg19size=hg19.chrom.sizes tfName="MEF_2A" bedFile="F5_robust_DPI_TSS_500_upstream_500_downstream_nonCoding_only.bed" ############################### ##### 1. Run ngs.plot.r ##### Mandatory parameters: #  -G   Genome name. Use ngsplotdb.py list to show available genomes. #  -R   Genomic regions to plot: tss, tes, genebody, exon, cgi, enhancer, dhs or bed #  -C   Indexed bam file or a...