diff --git a/scripts/iq_tree_/change_genes_names_in_both_pal2nal_and_tree.sh b/scripts/iq_tree_/change_genes_names_in_both_pal2nal_and_tree.sh new file mode 100644 index 0000000..1f8b898 --- /dev/null +++ b/scripts/iq_tree_/change_genes_names_in_both_pal2nal_and_tree.sh @@ -0,0 +1,3 @@ +pal2nal=$1 +tree=$2 +perl ~/Bin/inHouse/codeml_util/replace_gene_tree_and_alignment_with_same_names.pl $pal2nal $tree diff --git a/scripts/iq_tree_/change_iqGeneTree_to_old_names.sh b/scripts/iq_tree_/change_iqGeneTree_to_old_names.sh new file mode 100644 index 0000000..de9b9cd --- /dev/null +++ b/scripts/iq_tree_/change_iqGeneTree_to_old_names.sh @@ -0,0 +1,7 @@ +tree=$1 +#perl -ne 's/\)\d*:\d*\.\d*/\)/g; s/:\d*\.\d*//g; s/,/\n,/g; print $_;' $tree | sed 's/_/|/' | perl -ne 'chomp; s/\)\d+/\)/g; print $_;' > ${tree/.**}.original_names.tre + +#same as:perl -ne 's/\)\d*:\d*\.\d*/\)/g; s/:\d*\.\d*//g; s/,/\n,/g; s/\)\d+/\)/g; print $_;' $tree | sed 's/_/|/' | perl -ne 'chomp; print $_;' > + + +sed 's/,/\n/g' $tree | sed 's/_/\|/'| perl -ne 's/\)\d*:\d*\.\d*/\)/g; s/:\d*\.\d*//g; s/\n/,/;print $_;' |perl -pe 's/,$//;' > ${tree/.**}.original_names.tre diff --git a/scripts/iq_tree_/change_orthofinder.tree.2.original.names.sh b/scripts/iq_tree_/change_orthofinder.tree.2.original.names.sh new file mode 100644 index 0000000..ad98491 --- /dev/null +++ b/scripts/iq_tree_/change_orthofinder.tree.2.original.names.sh @@ -0,0 +1,8 @@ +tree=$1 +#perl -ne 's/\)\d*:\d*\.\d*/\)/g; s/:\d*\.\d*//g; s/,/\n,/g; print $_;' $tree | sed 's/_/|/' | perl -ne 'chomp; s/\)\d+/\)/g; print $_;' > ${tree/.**}.original_names.tre + +#same as:perl -ne 's/\)\d*:\d*\.\d*/\)/g; s/:\d*\.\d*//g; s/,/\n,/g; s/\)\d+/\)/g; print $_;' $tree | sed 's/_/|/' | perl -ne 'chomp; print $_;' > + + + +sed 's/,/\n/g' $tree | perl -ne 's/_\S+\|/\|/g; print $_;' | perl -ne 's/\)\d*:\d*\.\d*/\)/g; s/:\d*\.\d*//g; s/\n/,/;print $_;' > ${tree/_**}.original_names.tre