# some paths ## directories results_dir='results/10xgenomics_PBMC_5k_classification_2' data_dir='results/10xgenomics_PBMC_5k' ## input file_mat_open="$data_dir/ctcf_motifs_10e-6_open_bin1bp_read_atac.mat" file_mat_1nucl="$data_dir/ctcf_motifs_10e-6_1nucl_bin1bp_fragment_center.mat" file_mat_seq="$data_dir/ctcf_motifs_10e-6_sequences.mat" ## file with seeds file_seed=$results_dir'/ctcf_motifs_10e-6_seed.txt' mkdir -p $results_dir touch $file_seed # parameters n_iter='20' n_shift='21' seeding='random' n_core=3 # 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/'ctcf_motifs_10e-6_open_bin1bp_read_atac_1nucl_bin1bp_fragment_center_'$k'class_prob.mat4d' file_mod1=$results_dir/'ctcf_motifs_10e-6_open_bin1bp_read_atac_'$k'class_model.mat' file_mod2=$results_dir/'ctcf_motifs_10e-6_1nucl_bin1bp_fragment_center_'$k'class_model.mat' file_mod3=$results_dir/'ctcf_motifs_10e-6_sequences_'$k'class_model.mat' file_aic=$results_dir/'ctcf_motifs_10e-6_open_bin1bp_read_atac_'$k'class_aic.txt' echo "$file_prob $seed" >> $file_seed bin/ChIPPartitioning --read $file_mat_open --seq $file_mat_1nucl --class $k --shift $n_shift --flip --iter $n_iter --seeding $seeding --seed $seed --thread $n_core > $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