Eavis / web_app

0 stars 0 forks source link

solution_0519 #12

Open Eavis opened 7 years ago

Eavis commented 7 years ago

LOAD DATA LOCAL INFILE 'sample_info.txt' INTO TABLE boundaries fields terminated by '\t' lines terminated by '\n' (Samples,Censored,Survival,age_at_initial_pathologic_diagnosis_Clinical,gender-Is-male_Clinical,race-Is-white_Clinical,race-Is-black or african american_Clinical,race-Is-asian_Clinical,race-Is-american indian or alaska native_Clinical,histological_type-Is-oligoastrocytoma_Clinical,histological_type-Is-astrocytoma_Clinical,histological_type-Is-oligodendroglioma_Clinical,histological_type-Is-glioblastoma multiforme (gbm)_Clinical,histological_type-Is-treated primary gbm_Clinical,histological_type-Is-untreated primary (de novo) gbm_Clinical,radiation_therapy-Is-yes_Clinical)

Eavis commented 7 years ago

LOAD DATA LOCAL INFILE 'sample_info.txt' INTO TABLE clinical fields terminated by ',' lines terminated by '\n' (Samples, Censored, Survival, age_at_initial,gender_male,race_white,race_Black_orAfricanAmerican,race_Asian,race_AmericanIndian_orAlaskanative,histologicalType_oligodendroglioma,histological_astrocytoma,histological_oligodendroglioma,histological_glioblastoma_multiforme_gbm,histological_treated_primary_gbm,histological_untreated_primary_gbm,radiation_therapy_Is_yes);

Eavis commented 7 years ago

mysql> CREATE TABLE tutorials_tbl( -> tutorial_id INT NOT NULL AUTO_INCREMENT, -> tutorial_title VARCHAR(100) NOT NULL, -> tutorial_author VARCHAR(40) NOT NULL, -> submission_date DATE, -> PRIMARY KEY ( tutorial_id ) -> );

Eavis commented 7 years ago

mysql> CREATE TABLE clinical( -> Censored INT NOT NULL, -> Survival INT NOT NULL, -> age_at_initial INT NOT NULL, -> gender_male INT NOT NULL, -> race_white INT NOT NULL, -> race_Black_orAfricanAmerican INT NOT NULL, -> race_Asian INT NOT NULL, -> race_AmericanIndian_orAlaskanative INT NOT NULL, -> histologicalType_oligodendroglioma INT NOT NULL, -> histological_astrocytoma INT NOT NULL, -> histological_oligodendroglioma INT NOT NULL, -> histological_glioblastoma_multiforme_gbm INT NOT NULL, -> histological_treated_primary_gbm INT NOT NULL, -> histological_untreated_primary_gbm INT NOT NULL, -> radiation_therapy_Is_yes INT NOT NULL -> );

Eavis commented 7 years ago

ALTER TABLE clinical ADD Samples VARCHAR(16);

Eavis commented 7 years ago

LOAD DATA LOCAL INFILE 'clinical.txt' INTO TABLE clinical fields terminated by ‘,’ lines terminated by '\n' (name, Censored, Time, age_at_initial,gender_male,race_while,race_Black_orAfricanAmerican,race_Asian,race_AmericanIndian_orAlaskanative,histologicalType_oligodendroglioma,histological_astrocytoma,histological_oligodendroglioma,histological_glioblastoma multiforme(gbm),histological_treated primary gbm,histological_untreated primary (de novo) gbm_Clinical,radiation_therapy-Is-yes);

Eavis commented 7 years ago

ALTER TABLE clinical CHANGE COLUMN Time survival_time VARCHAR(80) NOT NULL;

Eavis commented 7 years ago

mysql -u root -p --local-infile=1