Friday, 31 August 2018

exFAT and Compability with Linux

What’s the Difference Between FAT32, exFAT, and NTFS?

How to Install exFAT Support

Tuesday, 28 August 2018

STAR Aligner In Retion to Phred Quality Encoding

Cited from Phred64 encoding consideration in STAR

"""
STAR does not need to phred quality encoding, at the moment it does not actually use quality scores for mapping. It will simply copy the quality strings into SAM output. If you want to convert the quality scores output is SAM for some reason, you can use --outQSconversionAdd <positive or negative number>.
"""

Monday, 27 August 2018

Interact with NCBI SRA using aspera ascp command line client

Interact with NCBI SRA using aspera ascp command line client

Download All Files From A Directory

wget – recursively download all files from certain directory listed by apache

Use of Ascp to Download SRA/Fastq from EBI/NCBI

使用Aspera从EBI或NCBI下载基因组数据

Explanation of SRA

NCBI SRA数据库使用详解

Downloading SRA Data Using Command Line Utilities from NCBI

Downloading SRA data using command line utilities

Downloading SRA files from NCBI

linux下用Aspera从NCBI上下载SRA格式宏基因组数据



Alignment Sam to Sequence Fastq Files

How to convert SAM to FASTQ with Unix command line tools

Check If a File Exists on a FTP Server

bash wget - check if file exists at url before downloading

wget: check if the file exists, but not download

Multi-line Comments in Bash

Multiline shell script comments - how does this work?

Wednesday, 22 August 2018

Nextflow SGE Executor Memory Specification

Cited from process memory

process my_process {
    memory {16.GB * task.attempt}                                                                                                                           
    clusterOptions "-l h_vmem=${memory.toString().replaceAll(/[\sB]/,'')}"
    ...
} 
 
Cited from Configuration

perJobMemLimit Specifies Platform LSF per-job memory limit mode

Friday, 17 August 2018

Customize Bash Prompt String

  1. Install sexy-bash-prompt
  2. Modifying the prompt symbol ('PROMPT_SYMBOL') in ~/.bash_prompt
    In Bash 4.2+, add the following line at the beginning.
    PROMPT_SYMBOL=$'\u21AA'
    In Bash 4.1 or earlier, add the following line at the beginning.
    PROMPT_SYMBOL=$'\xe2\x86\xaa'
  3. Then source ~/.bash_prompt
  4. UTF8 code for additional symbols may be found at UTF-8 Arrows
  5. Assigning UTF8 code to variables was demonstrated in Awesome symbols and characters in a bash prompt
  6. Hex code for UTF8 symbols can be found through echo ↪ | hexdump -C, for example.

PS1 vs PROMPT_COMMAND

Cited from What is the difference between PS1 and PROMPT_COMMAND

"""
The difference is that PS1 is the actual prompt string used, and PROMPT_COMMAND is a command that is executed just before the prompt.
"""

Thursday, 2 August 2018

Nextflow Task Specific Execution Path

Cited from Nextflow: a tutorial through examples

echo "Path is \$( pwd )\n "

Specifying $baseDir
 
"make sure the escape the $ with a backslash in your script"

echo "Path is \$PWD\n "

RNA-seq Strand-specific Terminology

Cited from Trinity strand specific: RF or FR

fr-firststrand (tophat) = RF (trinity)
fr-secondstrand (tophat) = FR (trinity)