page

Sep 16, 2019

How to copy files from one machine to another using ssh [duplicate]

https://unix.stackexchange.com/questions/106480/how-to-copy-files-from-one-machine-to-another-using-ssh


Syntax:
scp <source> <destination>
To copy a file from B to A while logged into B:
scp /path/to/file username@a:/path/to/destination
To copy a file from B to A while logged into A:
scp username@b:/path/to/file /path/to/destination

IGV : tracks for normalize coverage Data (need igvtools to make .tdf files)

https://software.broadinstitute.org/software/igv/igvtools
https://software.broadinstitute.org/software/igv/igvtools_commandline

The igvtools utility provides a set of tools for pre-processing data files. File names must contain an accepted file extension, e.g. test-xyz.bam. Tools include:
  • toTDF
    Converts a sorted data input file to a binary tiled data (.tdf) file.
    Used to preprocess large datasets for improved IGV performance.
    Supported input file formats: .cn, .gct, .igv, .res, .snp, and .wig
    Note: This tool was previously known as tile
  • count
    Computes average alignment or feature density for over a specified window size across the genome and outputs a binary tiled data .tdf file, text .wig file, or both depending on inputs.
    Used to create a track that can be displayed in IGV, for example as a bar chart.
    Supported input file formats: .aligned, .bam, .bed, .psl, .pslx, and .sam
  • index
    Creates an index file for an ASCII alignment or feature file.
    Index files are required for loading alignment files into IGV, and can significantly improve performance for large feature files. The file must be in sorted order by start position.
    Supported input file formats: .aligned, .bed, .psl, .sam, .bam, and .vcf (v3.2)
  • sort
    Sorts the input file by start position.
    Used to prepare data files for tools that required sorted input files.
    Supported input file formats: .aligned, .bed, .cn, .igv, .psl, .sam, .bam, and .vcf 
From IGV: igvtools is accessed by selecting Tools>Run igvtools.

igvtools count

 Supported input file formats are: .sam, .bam, .aligned, .psl, .pslx, and .bed.

Usage:
          igvtools count [options] [inputFile] [outputFile] [genome]
 The input file must be sorted by start position
http://software.broadinstitute.org/software/igv/book/export/html/6

To load normalized coverage track to IGV

View -> Preferences -> Tracks





Select to normalize tracks containing coverage data in .tdf files that were created using igvtools.  This normalization option multiplies each value by [1,000,000 / (totalReadCount)].
  • This is only available for .tdf files created using igvtools builds dated 1/28/2010 or later.  Earlier versions of igvtools did not record the total read count.
  • This selection takes effect with new sessions loaded afterwards.

Installing CMake

https://cmake.org/install/
https://cmake.org/download/
https://gist.github.com/1duo/38af1abd68a2c7fe5087532ab968574e#file-centos-install-cmake-from-source-md

Compile from source and install

tar zxvf cmake-3.*
cd cmake-3.*
./bootstrap --prefix=/usr/local
make
make install 

Validate installation

cmake --version

cmake version *.*.*
CMake suite maintained and supported by Kitware (kitware.com/cmake). 

Install, uninstall RPM on linux (CentOS, RHEL, Fedora)

https://phoenixnap.com/kb/how-to-install-rpm-file-centos-linux

Install RPM on Linux

sudo rpm –i sample_file.rpm
sudo yum localinstall sample_file.rpm 

Remove RPM Package

sudo rpm –e sample_file.rpm
 
 

Sep 4, 2019

Using grep -v on multiple arguments

https://www.thegeekstuff.com/2011/10/grep-or-and-not-operators

Using grep -v on multiple arguments

grep -v -e foo -e bar file

grep -Ev 'word1|word2'