0
$\begingroup$

I need to convert my three text files to the exact formatting of the corresponding example files in order to run my code. I think the formatting error being generated is from the geneID (bold) consisting of letters and numbers in my files but being only numbers in the example files. The IDs from file1 match the IDs from file2. How would I change the IDs in both files to be unique numbers that still match up between files?

This is the formatting (tab delimited):

My file1:

AL590447 EcGBM1 mRNA 57215 58105 . - . ECU07_0430-t26_1

AL590451 EcGBM1 mRNA 86606 87067 . + . ECU09_0650-t26_1

AL590449 EcGBM1 mRNA 50646 52472 . - . ECU10_0450-t26_1

Example file1:

sc14 Cryp_gatt_IND107_V2 mRNA 126181 127026 . + . 7000010363306351

sc14 Cryp_gatt_IND107_V2 mRNA 329254 331131 . - . 7000010363306425

sc14 Cryp_gatt_IND107_V2 mRNA 553185 557967 . - . 7000010363306508

My file2:

ECU01_0040-t26_1-p1 gene_id=ECU01_0040 locus=AL391737:12389-13003(+) name=“hypothetical protein” genome=ECU01_0040-t26_1 analysisRun=EcGBM1_FINAL_CALLGENES MCKDRQHTSRPQIQHNRVKTPLAKLTSTIAKGPLHRRSTMGRHRAAYHRCYRRSSKESSA IIPCKTRTYSTVSETAWRQTNPSPNELLLSMLPPVPRRPRGGCRPLHAPLLNKMPQTFPA ASERPMPSRRLSKATQNVQTRPSERPAPCHRRPGPRGPGGRDPPEACHPWSLGPELGLLA PSEVQFDCLEASRTWNTFIGAYTK*

ECU01_0050-t26_1-p1 gene_id=ECU01_0050 locus=AL391737:13837-14457(+) name=“hypothetical protein” genome=ECU01_0050-t26_1 analysisRun=EcGBM1_FINAL_CALLGENES MPRPASHLAPMPSDHPDFRSKSARLRCQPPRTNNCGTFKQPPSVAATSRPKPGNPFLQPP TKGTPPPKKKKKNHTEGCHTHEANPEPNTKHTETESPKPQTSTQHHTPITIPSSLLSQNT QREKRGLPLLTSRPSTIPANTYQPQSPHIHSHTPLQRPISTALLHQNLHIRARNIRHTGR LHGSPTKGAQTAQQAQPHPPKQLATL*

Example file2:

7000006584189241 gene_id=7000006584189240 locus=CGB_D0230C name="ubiquitin fusion degradation protein UFD1" genome=CNB_WM276_v2 analysisRun=CNB_WM276_v2_Final_CUSTOMCALLGENES_1 MNHGYDSEDEFDSYAAPPPLPGGPASILSHLMGGGFGGFHSAPPPSAYDDYFKAYSTAVM GGRERPEVMYGGKIIMPPSALARLSALDIPSPWTFQLRNPRSPTQHTTHAGVLEFIAEEG IVHLPAWMMKRLNLEEGDPVRLTGAKLPKGKMVKIQAQSTDFLQVSDPKSVLESALRFYS TLSPNDIIEITYNSLTFEFLIMSVVPEGPGISVIDTDLEVDFATPKGYVEPPRPEPKPIP TMADKLNIDLSSNEPTASGAASVSGGSRPGTSMGTQTPVESFTGVGQSLSGKKVKGKGLA KKIEEVDSSSKINRADGPRIINTSSLSSANAQVPSALILPEGKFFFGFKYIPYDPSKAPK PSLADQQKVELQPFGGEGNTLKNGKRVGGGEGKGKEKEKAADEEKEDPWAKLGSGNTLKR TTATAASSSSNPVPASAPQKEFETRKATEQEIIDATMLDEDDFMFEDEEDDEDDVIEIDS DYE*

7000006584189251 gene_id=7000006584189250 locus=CGB_E2410W name="hypothetical protein" genome=CNB_WM276_v2 analysisRun=CNB_WM276_v2_Final_CUSTOMCALLGENES_1 MATNPDSRPLPDGWVQQFNSEHQAWFYVNTKAPGGPASQWTHPADDQPTYAPPPGNPPSK TSTPFAPADDKSRGASEPYYQSSTPQPSGLQQAPYQPASQSASPGPQSQQEKKRGIGGFF SKLSGNNKPSGYQQGYGQAYPQQQQYGAYPQQQYGYAQQPMYQQQPMYQQQPMYAQRPQR AGMGAGGAAALGVGGGLLGGMLIGDMISDSQHDAYMDGYQDGDMGDMGGGDFGGDF*

$\endgroup$
  • $\begingroup$ Hi Victoria, i think you should indicate what are your downstream analysis. It will help us to propose you some code lines. For what I see, there is a common label in file2, being the "genome=xxxx" part, isn't it? $\endgroup$ – thomas duge de bernonville Jun 8 at 9:28

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.