#After getting faa and fna BUSCO files. #Correcting the reading frame of all CDS to +1 cd /home/tools/busco/dataset_10mar2018/busco_output for species in Ehians Egrac Cac Rhino Pho Coloc Chyamo Sleb mel vir do cd /home/tools/busco/dataset_10mar2018/busco_output/$species echo -en $species "\t" fix_busco_CDS_frame.awk mode=fix /home/tools/busco/diptera_odb9.gene_name echo "" done # Ehians CDS listed in input file: 2799 total CDS found: 2374 wrong frame CDS: 100 fixed CDS: 100 # Egrac CDS listed in input file: 2799 total CDS found: 2329 wrong frame CDS: 88 fixed CDS: 88 # Cac CDS listed in input file: 2799 total CDS found: 2622 wrong frame CDS: 40 fixed CDS: 40 # Rhino CDS listed in input file: 2799 total CDS found: 2616 wrong frame CDS: 53 fixed CDS: 53 # Pho CDS listed in input file: 2799 total CDS found: 2597 wrong frame CDS: 69 fixed CDS: 69 # Coloc CDS listed in input file: 2799 total CDS found: 2560 wrong frame CDS: 69 fixed CDS: 69 # Chyamo CDS listed in input file: 2799 total CDS found: 2627 wrong frame CDS: 39 fixed CDS: 39 # Sleb CDS listed in input file: 2799 total CDS found: 2587 wrong frame CDS: 45 fixed CDS: 45 # mel CDS listed in input file: 2799 total CDS found: 2748 wrong frame CDS: 6 fixed CDS: 6 # vir CDS listed in input file: 2799 total CDS found: 2718 wrong frame CDS: 16 fixed CDS: 16 # checking if all CDS got frame +1 cd /home/tools/busco/dataset_10mar2018/busco_output for species in Ehians Egrac Cac Rhino Pho Coloc Chyamo Sleb mel vir do cd /home/tools/busco/dataset_10mar2018/busco_output/$species echo $species fix_busco_CDS_frame.awk mode=detect /home/tools/busco/diptera_odb9.gene_name echo "" done #Ok, 0 wrong CDS in all species # now making one multifasta for each gene mkdir /home/tools/busco/dataset_10mar2018/multifasta/ cd /home/tools/busco/dataset_10mar2018/busco_output busco2multifasta.awk out_dir="/home/tools/busco/dataset_10mar2018/multifasta/" species="Ehians Egrac Cac Rhino Pho Coloc Chyamo Sleb mel vir" /home/tools/busco/diptera_odb9.gene_name #now selecting the orthologs present in all 10 species and with lenght of coefficient of variation < 10% cd /home/tools/busco/dataset_10mar2018/multifasta/ ortholog_count_file="/home/tools/busco/dataset_10mar2018/multifasta/Ehians_Egrac_Cac_Rhino_Pho_Coloc_Chyamo_Sleb_mel_vir_.ortholog_counts" awk '($2 ==10 ){print $0}' $ortholog_count_file | sort -k3,3n > 10species.ortholog_counts awk '(($2 ==10 )&&($3<=10)){print $0}' $ortholog_count_file | sort -k3,3n > 10speciesCV10.ortholog_counts #QC: wc -l *.ortholog_counts # 1603 10species.ortholog_counts # 1110 10speciesCV10.ortholog_counts # sequence total (approximation) awk '(1==1){sum += $4};END{print "sum= " sum}' $ortholog_count_file # sum= 4,582,882 awk '(1==1){sum += $4};END{print "sum= " sum}' 10species.ortholog_counts # sum= 3,132,558 awk '(1==1){sum += $4};END{print "sum= " sum}' 10speciesCV10.ortholog_counts #sum= 2,045,098 awk '(1==1){print $1}' 10speciesCV10.ortholog_counts > /home/tools/busco/dataset_10mar2018/10speciesCV10.gene_name wc /home/tools/busco/dataset_10mar2018/10speciesCV10.gene_name #1110 # now aligning with translatorX only the selected orthologs (10 species, CV <=10) mkdir /home/tools/busco/dataset_10mar2018/trx/ cd /home/tools/busco/dataset_10mar2018/trx/ nohup awk '(1==1){file="/home/tools/busco/dataset_10mar2018/multifasta/Ehians_Egrac_Cac_Rhino_Pho_Coloc_Chyamo_Sleb_mel_vir_" $1 ".fna" ; system("translatorx_vLocal.pl -g 1 -t F -i " file " -o " $1".trx ")}' /home/tools/busco/dataset_10mar2018/10speciesCV10.gene_name > nohup_trx.out & ls *.trx.nt_cleanali.fasta | wc # 1110 Ok , all run dos2unix -k nohup_trx.out #contail all messages #now concatenating in supermatrix (gene_list_file option not working) cd /home/tools/busco/dataset_10mar2018/ supermatrix2.awk defline_type="species_gene" gene_list_file=10speciesCV10.gene_name /home/tools/busco/dataset_10mar2018/trx/*.trx.nt_cleanali.fasta # number of fasta files: 1110 genes found: 1110 genes selected: 1110 species found: 10 #produced file concatenated_10mar2018.fasta