19 lines
435 B
Bash
Executable file
19 lines
435 B
Bash
Executable file
#!/bin/bash
|
|
|
|
# FIXME: This is written for expediency to kickstart running dynamut and mcsm-NA
|
|
|
|
# Usage: ~/git/LSHTM_analysis/dynamut/split_csv.sh <input file> <output dir> <chunk size in lines>
|
|
# copy your snp file to split into the mcsm_na dir
|
|
|
|
INFILE=$1
|
|
OUTDIR=$2
|
|
CHUNK=$3
|
|
|
|
mkdir -p ${OUTDIR}/${CHUNK}
|
|
cd ${OUTDIR}/${CHUNK}
|
|
|
|
split ../../${INFILE} -l ${CHUNK} -d snp_batch_
|
|
for i in *; do mv $i $i.txt; done
|
|
sed -i 's/^/A /g' *.txt
|
|
|
|
|