c2997108/centos7:1-trinity_2.8.5-kallisto_0.46.0-blast_2.9.0-trinotate-3.1.1-R_4-kegg_4 centos:centos6 using docker + set -o pipefail ++ echo input_1/Bomo_gene_models.withnote.plus.NC_002355.gff3 ++ grep '[.]gz$' ++ wc -l ++ true + '[' 0 = 1 ']' + awk '-F\t' '{OFS="\t"; gsub(/%../,"_",$9); gsub(/[^0-9a-zA-Z_;=-]/,"_",$9); print $0}' input_1/Bomo_gene_models.withnote.plus.NC_002355.gff3 + awk '-F\t' '{ split($9,arr,";"); str=""; for(i=1;i<=length(arr);i++){if(arr[i]!~"^[_0-9]"){if(str==""){str=arr[i]}else{str=str";"arr[i]}}}; $9=str; OFS="\t"; print $0 }' + awk '{ if($0!~"^#"){ OFS="\t"; split($9,arr,";"); str=""; for(i=1;i<=length(arr);i++){ if(arr[i]~"^ID=" || arr[i]~"^Name=" || arr[i]~"^Note=" || arr[i]~"^Parent"){ if(str==""){str=arr[i]}else{str=str";"arr[i]} }else{ if(str==""){str=tolower(substr(arr[i],1,1))""substr(arr[i],2)}else{str=str";"tolower(substr(arr[i],1,1))""substr(arr[i],2)} } }; $9=str }; print $0 }' ++ echo input_1/Bomo_gene_models.withnote.plus.NC_002355.gff3 ++ sed 's/[.]\(gff\|gff3\)$/.gtf/' + temp_1=input_1/Bomo_gene_models.withnote.plus.NC_002355.gtf ++ echo input_1/Bomo_gene_models.withnote.plus.NC_002355.gff3 ++ sed 's/[.]\(gff\|gff3\)$/.withname.gtf/' + temp_2=input_1/Bomo_gene_models.withnote.plus.NC_002355.withname.gtf + docker run -v /data/user2/work/71:/data/user2/work/71 -w /data/user2/work/71 -u root -i --rm c2997108/centos7:1-trinity_2.8.5-kallisto_0.46.0-blast_2.9.0-trinotate-3.1.1-R_4-kegg_4 gff3ToGenePred input_1/Bomo_gene_models.withnote.plus.NC_002355.gff3.rename /dev/stdout + docker run -v /data/user2/work/71:/data/user2/work/71 -w /data/user2/work/71 -u root -i --rm c2997108/centos7:1-trinity_2.8.5-kallisto_0.46.0-blast_2.9.0-trinotate-3.1.1-R_4-kegg_4 genePredToGtf file stdin input_1/Bomo_gene_models.withnote.plus.NC_002355.gtf + sed 's/ \+/ /g' input_1/Bomo_gene_models.withnote.plus.NC_002355.gtf + awk '-F\t' ' FILENAME==ARGV[1] && $3=="gene"{ split($9,arr,";"); id=""; name=""; note=""; for(i in arr){ if(tolower(substr(arr[i],1,3))=="id="){id=substr(arr[i],4)} else if(tolower(substr(arr[i],1,5))=="gene="){name=substr(arr[i],6)} else if(tolower(substr(arr[i],1,5))=="note="){note=substr(arr[i],6)}}; if(id!="" && name!="" && note!=""){id2name[id]=name"_"note} else if(id!="" && name!="" && note==""){id2name[id]=name} else if(id!="" && name=="" && note!=""){id2name[id]=note} } FILENAME==ARGV[2]{ a=$0; sub(/.*; gene_name "/,"",a); sub(/".*/,"",a); if(a!~"\t" && id2name[a]!=""){b=$0; c=$0; sub(/; gene_name ".*/,"; gene_name \"",b); sub(/.*; gene_name "[^"]*"/,"\"",c); print b""id2name[a]""c}else{print $0} }' input_1/Bomo_gene_models.withnote.plus.NC_002355.gff3.rename /dev/stdin + post_processing + '[' 1 = 1 ']' + '[' 'docker run -v $PWD:$PWD -w $PWD -u root -i --rm ' = 'docker run -v $PWD:$PWD -w $PWD -u root -i --rm ' ']' + docker run -v /data/user2/work/71:/data/user2/work/71 -w /data/user2/work/71 -u root -i --rm centos:centos6 chmod -R a=rXw . + echo 0 + exit