[ssh] ssh keep-alive tip

TA/Common 2012. 3. 27. 10:46

 

1. ssh -o TCPKeepAlive=yes mark@localhost

 

or

 

2.

Remember that

ServerAliveInterval

is limited by

ServerAliveCountMax

and that ServerAliveCountMax is set to 3 by default!

That is, if you set ServerAliveInterval to 60 and ServerAliveCountMax is left to default value (3), after the client has sent 3 keep alive packets it will disconnect. That makes 60 x 3 = 180 seconds.

So if you want more time away, you set ServerAliveInterval to 60 and ServerAliveCountMax to the numer you want (for example: 100). The client will send one keep alive packet every 0 seconds for 100 times or, if you prefer, 100 keep alive packets, one every 60 seconds. :D

You set this up in your $HOME/.ssh/config file.

Most of these options are explained in man ssh_config.

Thanks a lot to Cam for pointing us all in the right direction!!!!

Posted by 옥탑방람보
,

java.io.IOException: no locks available

 

마운트시 -o nolock 옵션 적용

$> mount -t nfs -o nolock

fstab에 적용

$> vi /etc/fstab

XXX:/storageDir /local nfs nolock 0 0

---------------------------------------------------------

<rocks clusters>

nfs 파일 시스템에서 파일 lock 이 되지 않을 때
아래와 같이 수정하고 nfs 데몬 재시작, nfslock 데몬 재시작
(예상 관련 데몬: portmap, autofs)

[system]$ cat /etc/auto.home
user01  -fstype=nfs,nolock 111.111.111.111:/data/home/user01

'TA > Common' 카테고리의 다른 글

[pam.d] 패스워드 복잡성 적용 방법  (1) 2012.12.13
[gparted] gparted 설치 (fedora17)  (0) 2012.12.13
[ssh] ssh keep-alive tip  (0) 2012.03.27
[nfs] nfs 서버와 클라이언트 계정 동기화 설정  (0) 2011.10.19
[linux] Standard I/O  (0) 2011.08.10
Posted by 옥탑방람보
,

부모 둘다: WT hom
자식(환자): het

부모에서는 전혀 인자가 발견되지 않는데 환자에게서 새롭게 발견되는 변이이다.
이 경우는 사실상 MIE(medelian inheritance error) 에 해당되지만, 동시에 자식에게서 스스로 발생된 새로운 변이로 볼 수 있다. 그리고 이 변이가 실제 병으로 표현되는 인자라면 우성변이가 새롭게 생긴 위치라 할 수 있다.
Posted by 옥탑방람보
,
한 사이트에 대해서

부모 둘다: Het
자식(환자): Homo variant


부, 모는 모두 환자가 아닌데 환자인 자식에게서 병의 요인으로 나타나는 위치를 찾는다.
즉 부,모 에서는 Het 로 존재하여 열성으로 존재하여 병으로 표현되지 않지만, 부,모 각 열성인자를 하나씩 받은 자식에게서는 병으로 표현되는 경우.
Posted by 옥탑방람보
,

Compound heterozygosity in medical genetics is the condition of having two heterogeneous recessive alleles at a particular locus that can cause genetic disease in a heterozygous state.

부, 모, 자1(환자), 자2(환자 or 정상)

조합 1
부 (site1/site2): WT Hom/Het
모 (site1/site2): Het/WT Hom
자1 (site1/site2): Het/Het

조합 2
부 (site1/site2): Het/WT Hom
모 (site1/site2): WT Hom/Het
자1 (site1/site2): Het/Het

환자일 경우 반드시 하나의 유전자에서 발견된 2개의 변이에서 모두 Het 여야함.
부모는 각각 한 사이트씩 Het 여야함.
단. 부모 중 한 사람이라도 Variant Hom 일수 없음.

형제(자2)까지 고려하여 확인할 경우 경우
형제가 환자일 경우 Het/Het 여야함.
환자가 아닐 경우 WT Hom/WT Hom. WT Hom/Het, Het/WT Hom 세가지 경우가 가능.


이 compound heterozygous 는 하나의 위치(유전자)에서 두개의 het 가 병으로 표현되는 인자를 이른다. 따라서 환자가 아닌 부모에서는 이러한 병으로 갈 수 있는 인자가 동시에 존재하면 안된다. 즉 부모는 각각은 Het 를 하나씩가지면서 WT Hom 을 가지고 있어  site1은 부모 한쪽에서 변이를, site2는 다른 쪽에서 변이를 받아 두개의 변이가 동시에 하나의 병으로 표현되는 것을 찾는 것이다. 
Posted by 옥탑방람보
,

Picard를 이용하여 MarkDuplicates 를 수행하는 데 있어서,

"Value was put into PairIntoMap more than once" 라는 에러메시지가 발생하고 프로세스가 죽는 경우 입니다.

 

이 문제에 대해 해결할 수 있는 방안을 찾은 것 같습니다.

이 문제는 BAM파일 내의 리드 정보가 first read와 second read 사이의 flag 및 맵핑 위치 정보가 서로 맞지 않아 발생되는 오류로 확인하였습니다.

이것은 앞서 시도한 BWA -A 옵션을 줌으로써 mate에 대한 정보를 보정해주지 않는 것이 문제를 일으킨것 같습니다.

 

따라서 BWA -A 을 수행한 후에는

samtools fixmate input.bam output.bam

을 수행한 다음 이 output.bam 을 이용해 MarkDuplicates 를 수행하면 됩니다.
 

또 다른 경우로 밤파일들을 머지 한 데이터를 사용할 경우 머지한 밤파일내에 리드아이디가 중복해서 존재하게 되면 또한 위와 같은 에러가 발생합니다.
이러한 경우는 머지를 할때 samtools merge 를 사용할 경우입니다.
Picard의 MergeSamFiles.jar 를 이용하면 개발 bam들이 동일한 RG ID를 갖고 있으면, 자동으로 RG_ID 뒤에  ".1" 과 같이 숫자 인덱스를 만들어주게 됩니다. 보통 bioscope 등을 이용하여 맵핑한 bam 파일들은 RG_ID 가 default라는 명칭으로 되어 있습니다.

따라서 정리하면 위와 같은 에러메시지가 발생할 경우

1. "Value was put into PairIntoMap more than once"  와 함께 나타나는 리드 아이디가 중복해서 존재하는지 확인한다.
2. 중복해서 존재할 경우에는 merge 하는 툴을 Picard를 이용한다.
3. 중복해서 존재하지 않을 경우에는 samtools fixmate 를 실행한 후 재분석한다.


이상//

Posted by 옥탑방람보
,


bwa 를 이용한 pairing 에서 감당되지 않는 많은 시간이 소요되는 현상(4~5일 경과까지 지켜봄)이 나타납니다.

자세히 현상을 확인해본 결과

데이터 자체가 Pair-end 의 두 쌍의 데이터가 현저하게 떨어져 (insert size) 맵핑이 될때 문제가 발생되는 것으로 보입니다.

(아마 이것은 로우 데이터 자체에 문제가 있는 경우가 아닌가 생각됩니다.)

 

자세히 보면,

bwa 는 한쪽 end 가 unmapped 된 경우 이를 사용자가 넣은 max insert size 로 보정하는 단계가 있는 것으로 확인됩니다.

이로써 전체 데이터의 mapping rate, properly paired rate을 향상 시키고 잇는 것으로 확인됩니다.

간단하게 테스트 결과

read1, read2 에 각각 25만개의 리드가 있을 경우 chr22 레퍼런스에 맵핑하여 확인결과

1. max insert size 로 보정하는 단계를 스킵 (-A 옵션) 시킨경우

==> 198999 mapped (3.98%), 18295 properly paired (0.37%) 로 나타나지만,

2. max insert size (500) 로 보정할 경우

==> 207601 mapped (4.15%), 37214 properly paired (0.74%) 로 나타났습니다.

이 단계를 스킵하게 되면 전체적인 맵핑 통계수치가 낮게 나타나지만 속도 측면에서 큰 효과를 볼 수 있습니다.

특히 이 경우 처럼 Pair-end 의 두 쌍의 데이터가 현저하게 떨어져 맵핑이 된 상태의 데이터는 이 단계를 스킵으로 결과가 떨어지지만, 이 단계를 거치게 되면 일주일(?) 이상 소요됩니다.

Posted by 옥탑방람보
,

1. Boost : www.boost.org
If you do not have Boost, it is fairly easy to install it. Just download source package and unpack it somewhere. No compilation is necessary. Define environmental variable BOOST to the path to the Boost base directory. i.e, all the Boost header files should be accessible at $BOOST/boost.

2. GSL : GNU Scientific Library
Version 1.0 or later is required (The lastest version, currently 1.3, is recommended. It is fee so there is no reason not to upgrade). You should have script gsl-config on your PATH. Try the command

> gsl-config --version
1.3

to make sure you have the right version of GSL installed.

<Installation>
> tar xvf hotspotter-1.2.1.tar.gz
> cd hotspotter-1.0
> env BOOST=/path/to/boost make     (/usr/include/boost)


------------------
그냥 위와 같이 하면 에러가 발생한다.
 소스에 기본적으로 2가지 에러가 있다.
1. hotspotter/mll/stat/cfunc.hpp  파일에 오타가 있다. 211번째 라인에 있는 endl 을 end 로 변경해주어야 한다.
2. hostpotter/src/minim1D.hpp 파일에 헤더가 하나 빠져 있다.  include assert.h 를 해주어야 한다.

Posted by 옥탑방람보
,
밤파일 만들때 레퍼런스랑 지금 돌리는 레퍼런스랑 다를 경우 발생되는 에러이다.


<에러메세지>
org.broadinstitute.sting.utils.exceptions.ReviewedStingException: Invalid sequence number 24
 at org.broadinstitute.sting.gatk.datasources.reads.GATKBAMIndex.<init>(GATKBAMIndex.java:100)
 at org.broadinstitute.sting.gatk.datasources.reads.BAMSchedule.<init>(BAMSchedule.java:105)
 at org.broadinstitute.sting.gatk.datasources.reads.BAMScheduler.getNextOverlappingBAMScheduleEntry(BAMScheduler.java:205)
 at org.broadinstitute.sting.gatk.datasources.reads.BAMScheduler.advance(BAMScheduler.java:108)
 at org.broadinstitute.sting.gatk.datasources.reads.BAMScheduler.next(BAMScheduler.java:79)
 at org.broadinstitute.sting.gatk.datasources.reads.BAMScheduler.next(BAMScheduler.java:47)
 at net.sf.picard.util.PeekableIterator.advance(PeekableIterator.java:71)
 at net.sf.picard.util.PeekableIterator.next(PeekableIterator.java:57)
 at org.broadinstitute.sting.gatk.datasources.reads.LowMemoryIntervalSharder.next(LowMemoryIntervalSharder.java:61)
 at org.broadinstitute.sting.gatk.datasources.reads.LowMemoryIntervalSharder.next(LowMemoryIntervalSharder.java:36)
 at org.broadinstitute.sting.gatk.datasources.reads.LocusShardStrategy.next(LocusShardStrategy.java:142)
 at org.broadinstitute.sting.gatk.datasources.reads.LocusShardStrategy.next(LocusShardStrategy.java:42)
 at org.broadinstitute.sting.utils.threading.GenomeLocProcessingTracker$OwnershipIterator$1.doBody(GenomeLocProcessingTracker.java:258)
 at org.broadinstitute.sting.utils.threading.GenomeLocProcessingTracker$OwnershipIterator$1.doBody(GenomeLocProcessingTracker.java:250)
 at org.broadinstitute.sting.utils.threading.GenomeLocProcessingTracker$WithLock.run(GenomeLocProcessingTracker.java:423)
 at org.broadinstitute.sting.utils.threading.GenomeLocProcessingTracker$OwnershipIterator.next(GenomeLocProcessingTracker.java:250)
 at org.broadinstitute.sting.utils.threading.GenomeLocProcessingTracker$OwnershipIterator.next(GenomeLocProcessingTracker.java:213)
 at org.broadinstitute.sting.gatk.executive.LinearMicroScheduler.execute(LinearMicroScheduler.java:53)
 at org.broadinstitute.sting.gatk.GenomeAnalysisEngine.execute(GenomeAnalysisEngine.java:235)
 at org.broadinstitute.sting.gatk.CommandLineExecutable.execute(CommandLineExecutable.java:117)
 at org.broadinstitute.sting.commandline.CommandLineProgram.start(CommandLineProgram.java:221)
 at org.broadinstitute.sting.gatk.CommandLineGATK.main(CommandLineGATK.java:87)

==>

This is a terrible error message with what I suspect is a fairly simple cause: I think you're running with a different reference (or different version of the same reference) than the reference to which your BAMs were initially aligned. Can you check to make sure that the version of the reference you're using matches the BAMs exactly?
(http://getsatisfaction.com/gsa/topics/unifiedgenotyper_problem_with_nt_option)
Posted by 옥탑방람보
,
> vi /etc/exports

root_squash, no_root_squash : NFS 서버에도 root 사용자가 있을 것이고, NFS 클라이언트에도 root가 있을 것이다. 그러나 두 root가 같은 root가 될 순 없다. NFS 클라이언트의 root가 NFS 서버의 root 권한을 가질 수 없다. 따라서 기본값은 root_squash로 클라이언트 root는 nobody와 같은 사용자로 맵핑되어 버린다. 서버와 클라언트의 root 사용자를 일치하도록 하려면 no_root_squash라고 적으면 된다.

all_squash, no_all_squash : 기본값은 no_all_squash로서 root를 제외한 일반 사용자 ID에 대해서는 서버와 클라이언트 UID가 동일한 사용자이며 동일한 권한을 갖는다고 생각한다. 이는 root에 대한 기본 처리값과 반대이다. 그러나 all_squash를 해버리면 모든 UID, GID를 무조건 익명 사용자 ID로 매핑해 버린다.

> nfs restart


======================

[Rocks-Discuss]Cannot write to user home on compute node

Tim Carlson tim.carlson at pnl.gov
Thu Feb 16 11:47:40 PST 2006


On Thu, 16 Feb 2006, Chuming Chen wrote:

Add no_root_squash to the options in /etc/exports and then restart the NFS 
services on the frontend.

Tim

Tim Carlson
Voice: (509) 376 3423
Email: Tim.Carlson at pnl.gov
Pacific Northwest National Laboratory
HPCaNS: High Performance Computing and Networking Services

> Hi,
>
> On the compute node, as the user, I can create file in my home. But as
> root, I failed. What would be wrong here?
>
> [chen at compute-0-0 ~]$ pwd
> /home/chen
> [chen at compute-0-0 ~]$ ls -l test
> ls: test: No such file or directory
> [chen at compute-0-0 ~]$ touch test
> [chen at compute-0-0 ~]$ ls -l test
> -rw-rw-r--  1 chen chen 0 Feb 16 13:50 test
>
> [root at compute-0-0 chen]# pwd
> /home/chen
> [root at compute-0-0 chen]# touch test
> touch: cannot touch `test': Permission denied
>
> Thanks a lot.
>
> Chuming Chen
>

Posted by 옥탑방람보
,