comparison test-data/subset_bed.sh @ 1:1932808c6fab draft default tip

"planemo upload for repository https://github.com/galaxyproject/tools-iuc/tree/master/tools/king/ commit 1c50106137c5b3260f18864ac9084056fa91ec80"
author iuc
date Mon, 18 Apr 2022 18:04:56 +0000
parents
children
comparison
equal deleted inserted replaced
0:ec2bc87ebd7b 1:1932808c6fab
1 binary_file=ex.bed
2 target_markers=6000
3 target_cols=$(( 6 + ( $target_markers * 2 )))
4
5 dec_prefix=out
6 subs_prefix=sub
7 new_prefix="new."${target_markers}
8
9 ##conda activate plink
10 ## Extract binary file into new map, ped, and fam files
11 plink --bfile $(basename $binary_file .bed) --recode --out ${dec_prefix}
12
13 ## Subset ped and map
14 cat ${dec_prefix}.ped | cut -d' ' -f 1-${target_cols} > ${subs_prefix}.ped
15 head ${dec_prefix}.map -n ${target_markers} > ${subs_prefix}.map
16
17 ## Recode into new
18 plink --file ${subs_prefix} --out ${new_prefix}
19 echo ${new_prefix}*
20 ##conda deactivate