# some paths ## directories results_dir='results/10xgenomics_PBMC_5k_motifs_classification_6' data_dir='data/10xgenomics_PBMC_5k_motifs' ## input file_mat_seq="$data_dir/ctcf_motifs_10e-6_sp1_motifs_10e-7_sequences_rmsk.mat" file_mat_open="$data_dir/ctcf_motifs_10e-6_sp1_motifs_10e-7_open_bin1bp_read_atac_rmsk.mat" file_mat_nucl="$data_dir/ctcf_motifs_10e-6_sp1_motifs_10e-7_nucleosomes_bin1bp_fragment_center_rmsk.mat" ## file with seeds file_seed=$results_dir'/ctcf_motifs_10e-6_sp1_motifs_10e-7_open_bin1bp_read_atac_rmsk_seed.txt' mkdir -p $results_dir touch $file_seed # parameters n_iter='20' n_shift1='1' n_shift2='21' n_core=32 # open chromatin for i in {1..10} do for k in 2 3 4 5 6 do # without shift seed=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-15};echo) file_prob=$results_dir/'ctcf_motifs_10e-6_sp1_motifs_10e-7_open_bin1bp_read_atac_rmsk_'$k'class_'$n_shift1'shift_prob_'$i'.mat4d' file_prob2=$results_dir/'ctcf_motifs_10e-6_sp1_motifs_10e-7_open_bin1bp_read_atac_rmsk_'$k'class_'$n_shift1'shift_prob_'$i'.txt' file_mod1=$results_dir/'ctcf_motifs_10e-6_sp1_motifs_10e-7_open_bin1bp_read_atac_rmsk_'$k'class_'$n_shift1'shift_model_'$i'.mat' file_mod2=$results_dir/'ctcf_motifs_10e-6_sp1_motifs_10e-7_nucleosomes_bin1bp_fragment_center_rmsk_'$k'class_'$n_shift1'shift_model_'$i'.mat' file_mod3=$results_dir/'ctcf_motifs_10e-6_sp1_motifs_10e-7_sequences_rmsk_'$k'class_'$n_shift1'shift_model_'$i'.mat' echo "$file_prob $seed" >> $file_seed bin/EMRead --read $file_mat_seq --class $k --shift $n_shift1 --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_nucl --prob $file_prob --thread $n_core 1> $file_mod2 bin/ProbToModel --seq $file_mat_seq --prob $file_prob --thread $n_core 1> $file_mod3 bin/MatrixBinToTxt --file $file_prob --type double --ndim 4 > $file_prob2 # with shift seed=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-15};echo) file_prob=$results_dir/'ctcf_motifs_10e-6_sp1_motifs_10e-7_open_bin1bp_read_atac_rmsk_'$k'class_'$n_shift2'shift_prob_'$i'.mat4d' file_prob2=$results_dir/'ctcf_motifs_10e-6_sp1_motifs_10e-7_open_bin1bp_read_atac_rmsk_'$k'class_'$n_shift2'shift_prob_'$i'.txt' file_mod1=$results_dir/'ctcf_motifs_10e-6_sp1_motifs_10e-7_open_bin1bp_read_atac_rmsk_'$k'class_'$n_shift2'shift_model_'$i'.mat' file_mod2=$results_dir/'ctcf_motifs_10e-6_sp1_motifs_10e-7_nucleosomes_bin1bp_fragment_center_rmsk_'$k'class_'$n_shift2'shift_model_'$i'.mat' file_mod3=$results_dir/'ctcf_motifs_10e-6_sp1_motifs_10e-7_sequences_rmsk_'$k'class_'$n_shift2'shift_model_'$i'.mat' echo "$file_prob $seed" >> $file_seed bin/EMRead --read $file_mat_seq --class $k --shift $n_shift2 --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_nucl --prob $file_prob --thread $n_core 1> $file_mod2 bin/ProbToModel --seq $file_mat_seq --prob $file_prob --thread $n_core 1> $file_mod3 bin/MatrixBinToTxt --file $file_prob --type double --ndim 4 > $file_prob2 done done