I would like to separate gene names that were joined by dash. I would like to replace by tabs.My input file is:Cedr3g0570.1_XP_019283.1Cedr4g7930.2_XP_019241.1Cedr5g005170.1_C0LGS3.1Cedr7g0290.5_XP_01921.1CT35v5_contig_2082_1.6_XP_0272.1CT35v5_Cedr2g060.1_GAU97.1CT7New_004.1_XP_01996.1But I would like the follow output:Cedr3g0570.1            XP_019283.1Cedr4g7930.2            XP_019241.1Cedr5g005170.1          C0LGS3.1Cedr7g0290.5            XP_01921.1CT35v5_contig_2082_1.6  XP_0272.1CT35v5_Cedr2g060.1      GAU97.1CT7New_004.1            XP_01996.1The issue is that I cannot simple replace the first dash because I have some genes with dash in their names, such as CT35v5_contig_2082_1.6.I tried to use sed 's/_/\t/' but it did not work for some genes, such as CT35v5_contig_2082_1.6
How to separate gene names joined by underscore?
sed;replace;text formatting;bioinformatics
sed 's/\(\.[0-9]\)\(_\)/\1 /' inputfile | column -tThe regular expression /\.[0-9]_/ appears to match your case, so I split that into two backreference groups using parens, and print the first group and some whitespace, thereby separating your columns, which can then be tabularized using column -t.