Question: make markers into 1MB nonoverlapping windows
0
gravatar for hxtao
7 days ago by
hxtao0
hxtao0 wrote:
#!/bin/bash
#PBS -q longlong
#PBS -l nodes=1:ppn=5

if [ -n "$PBS_O_WORKDIR" ]; then
    cd $PBS_O_WORKDIR
fi

for i in $(seq 233515 315320599)
do
    plink  --bfile tg2\
           --chr 1
           --from-bp ${i}\
           --to-bp  ${i+1000000} \
           --allow-no-sex \
           --make-bed\
           --out tg${i}


done

I used plink to make markers into 1Mb windows .The command like this,but I got no answers.I don't know why this happened.

snp software error gene • 96 views
ADD COMMENTlink modified 7 days ago by Pierre Lindenbaum101k • written 7 days ago by hxtao0
0
gravatar for Pierre Lindenbaum
7 days ago by
France/Nantes/Institut du Thorax - INSERM UMR1087
Pierre Lindenbaum101k wrote:

1 ) with

for i in $(seq 233515 315320599)

you filling your memory with the numbers from 233515 315320599 (about 3 Giga bytes in memory)

$ seq 233515 315320599 | wc -c
3,040,571,395

use streaming

 seq 233515 315320599 | while read i; do ...

2) this is not bash:

${i+1000000}

it will always produce

1000000

$ seq 1 2 3 | while read T; do echo -e "${T} to ${T+10000}" ; done
1 to 10000
3 to 10000

what you want is

$ seq 1 2 3 | while read T; do echo -e "${T} to $(($T+10000))" ; done
1 to 10001
3 to 10003
ADD COMMENTlink modified 7 days ago • written 7 days ago by Pierre Lindenbaum101k
Please log in to add an answer.

Help
Access

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 924 users visited in the last hour