# some paths ## directories results_dir='results/10xgenomics_PBMC_5k_motifs_classification_2' data_dir='data/10xgenomics_PBMC_5k_motifs' ## input file_mat_open="$data_dir/sp1_motifs_10e-7_open_bin1bp_read_atac.mat" file_mat_1nucl="$data_dir/sp1_motifs_10e-7_1nucl_bin1bp_fragment_center.mat" file_mat_seq="$data_dir/sp1_motifs_10e-7_sequences.mat" ## file with seeds file_seed=$results_dir'/sp1_motifs_10e-7_seed.txt' mkdir -p $results_dir touch $file_seed # parameters n_iter='20' n_shift='21' n_core=12 # open chromatin and nucleosomes for k in 1 2 3 4 5 6 7 8 9 10 do seed=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-15};echo) file_prob=$results_dir/'sp1_motifs_10e-7_open_bin1bp_read_atac_1nucl_bin1bp_fragment_center_'$k'class_prob.mat4d' file_mod1=$results_dir/'sp1_motifs_10e-7_open_bin1bp_read_atac_'$k'class_model.mat' file_mod2=$results_dir/'sp1_motifs_10e-7_1nucl_bin1bp_fragment_center_'$k'class_model.mat' file_mod3=$results_dir/'sp1_motifs_10e-7_sequences_'$k'class_model.mat' file_aic=$results_dir/'sp1_motifs_10e-7_open_bin1bp_read_atac_'$k'class_aic.txt' echo "$file_prob $seed" >> $file_seed bin/EMJoint --read $file_mat_open --seq $file_mat_seq --class $k --shift $n_shift --flip --iter $n_iter --seed $seed --thread $n_core --out $file_prob bin/ProbToModel --read $file_mat_open --prob $file_prob --thread $n_core 1> $file_mod1 bin/ProbToModel --read $file_mat_1nucl --prob $file_prob --thread $n_core 1> $file_mod2 bin/ProbToModel --seq $file_mat_seq --prob $file_prob --thread $n_core 1> $file_mod3 done