page

May 8, 2018

Qt: XKEYBOARD extension not present on the X server.


check details in
https://github.com/spyder-ide/spyder/issues/3713


From replies

athlonshi commented on 4 Jul 2017

For those using Exceed X Server, you may also need to change Xconfig setting. Go to Xconfig --> Settings --> Protocol... --> Extensions --> check XKEYBOARD and save the settings.

Oreki47 commented on 6 Oct 2017

I'm using TightVNC with Ubuntu 14.04.
It works on my machine with:
export XKB_DEFAULT_RULES=base
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
The set rules has to come first.

Apr 18, 2018

RNA-seq analysis is easy as 1-2-3 with limma, Glimma and edgeR

https://www.bioconductor.org/help/workflows/RNAseq123/

voom: precision weights unlock linear model analysis tools for RNA-seq read counts

https://genomebiology.biomedcentral.com/articles/10.1186/gb-2014-15-2-r29


linear modeling for RNA-seq count data


Abstract
New normal linear modeling strategies are presented for analyzing read counts from RNA-seq experiments. The voom method estimates the mean-variance relationship of the log-counts, generates a precision weight for each observation and enters these into the limma empirical Bayes analysis pipeline. This opens access for RNA-seq analysts to a large body of methodology developed for microarrays. Simulation studies show that voom performs as well or better than count-based RNA-seq methods even when the data are generated according to the assumptions of the earlier methods. Two case studies illustrate the use of linear modeling and gene set testing methods

How do you read from stdin in Python?

How do you read from stdin in Python?

https://stackoverflow.com/questions/1450393/how-do-you-read-from-stdin-in-python


Here's from Learning Python:
import sys
data = sys.stdin.readlines()
print "Counted", len(data), "lines."

On Unix, you could test it by doing something like:
% cat countlines.py | python countlines.py 
Counted 3 lines.
On Windows or DOS, you'd do:
C:\> type countlines.py | python countlines.py 
Counted 3 lines.

BED file handling software : bedtools, BEDOPS

bedtoolsa powerful toolset for genome arithmetic


http://bedtools.readthedocs.io/en/latest/#

bedtools allows one to intersectmergecountcomplement, and shuffle genomic intervals from multiple files in widely-used genomic file formats such as BAM, BED, GFF/GTF, VCF. While each individual tool is designed to do a relatively simple task (e.g., intersect two interval files), quite sophisticated analyses can be conducted by combining multiple bedtools operations on the UNIX command line.




BEDOPS: the fast, highly scalable and easily-parallelizable genome analysis toolkit


https://bedops.readthedocs.io/en/latest/index.html

BEDOPS is an open-source command-line toolkit that performs highly efficient and scalable Boolean and other set operations, statistical calculations, archiving, conversion and other management of genomic data of arbitrary scale. Tasks can be easily split by chromosome for distributing whole-genome analyses across a computational cluster.

Data conversion


UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 157: ordinal not in range(128)

http://markhneedham.com/blog/2015/05/21/python-unicodeencodeerror-ascii-codec-cant-encode-character-uxfc-in-position-11-ordinal-not-in-range128/

https://stackoverflow.com/questions/21129020/how-to-fix-unicodedecodeerror-ascii-codec-cant-decode-byte

https://stackoverflow.com/questions/24358361/removing-u2018-and-u2019-character


>>> for row in query.rows():
...     output.write(str(row["primaryIdentifier"])+'\t'+str(row["symbol"])+'\t'+str(row["briefDescription"])+'\t'+str(row["isObsolete"])+'\t'+str(row["description"])+'\t'+str(row["curatorSummary"])+'\n')
...
Traceback (most recent call last):
  File "<stdin>", line 2, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\u2019' in position 157: ordinal not in range(128)


 Solution

1) Change the default encoding of the whole script to be 'UTF-8',


# encoding=utf8
import sys
reload(sys)
sys.setdefaultencoding('utf8')


2)  replace them with their ASCII equivalent

>>> print u"\u2018Hi\u2019"
Hi
>>> print u"\u2018Hi\u2019".replace(u"\u2018", "'").replace(u"\u2019", "'")
'Hi'
Alternatively with regex:
import re
s = u"\u2018Hi\u2019"
>>> print re.sub(u"(\u2018|\u2019)", "'", s)
'Hi'

Jan 2, 2018

How to do MD5 checksum

http://linux.byexamples.com/archives/198/md5-checksum-how-to/

md5 is used to verify data integrity, the correctness of files you downloaded.

[admin@localhost]$ md5sum your_file


check multiple file

1) create md5sum.txt file

1st column : md5 string     2nd column : location of the file.

[admin@localhost]$ more md5sum.txt
9e9ccb13b31defc2b5207646d9ba07b5 Ibd11-1_1.fastq.gz
df040df4307bc24f54a69c9774d5a72f Ibd11-1_2.fastq.gz
a3fa0b9a3d9b2d843319b7ea3374318b Ibd11-2_1.fastq.gz
be29dcc8407a09ab1f0316727c1651bf Ibd11-2_2.fastq.gz
8e6f2cbaaf124be4b96b0e03e4ffa680 Ibd11-3_1.fastq.gz
8586451a651c37d4b6b9d72998f581e6 Ibd11-3_2.fastq.gz



[admin@localhost]$ md5sum -c md5sum.txt
Ibd11-1_1.fastq.gz: OK
Ibd11-1_2.fastq.gz: OK
Ibd11-2_1.fastq.gz: OK
Ibd11-2_2.fastq.gz: OK
Ibd11-3_1.fastq.gz: OK
Ibd11-3_2.fastq.gz: OK