For the 2nd suggestion: I want to compare 4 factors. Here is my command:
fit_data = Maaslin2(
-
input_data = df_input_data,
-
input_metadata = df_input_metadata,
-
output = "output_nondigested_ingredient_noRM", fixed_effects= c("Fat", "Carbohydrate", "Dietary.Fiber", "Protein"), random_effects = NULL, normalization = 'NONE', transform= "LOG", standardize = TRUE, plot_heatmap = TRUE, plot_scatter = TRUE, heatmap_first_n = 10)
In the output:
2021-11-15 12:07:04 INFO::Formula for fixed effects: expr ~ Fat + Carbohydrate + Dietary.Fiber + Protein
2021-11-15 12:07:04 INFO::Running selected normalization method: NONE
2021-11-15 12:07:04 INFO::Filter data based on min abundance and min prevalence
2021-11-15 12:07:04 INFO::Total samples in data: 5
2021-11-15 12:07:04 INFO::Min samples required with min abundance for a feature not to be filtered: 0.500000
2021-11-15 12:07:04 INFO::Total filtered features: 0
2021-11-15 12:07:04 INFO::Filtered feature names:
2021-11-15 12:07:04 INFO::Applying z-score to standardize continuous metadata
2021-11-15 12:07:04 INFO::Running selected transform method: LOG
2021-11-15 12:07:04 INFO::Running selected analysis method: LM
| | 0 % ~calculating 2021-11-15 12:07:04 INFO::Fitting model to feature number 1, B. infantis
|++++++ | 11% ~00s 2021-11-15 12:07:04 INFO::Fitting model to feature number 2, B. longum
|++++++++++++ | 22% ~00s 2021-11-15 12:07:04 INFO::Fitting model to feature number 3, B. breve
|+++++++++++++++++ | 33% ~00s 2021-11-15 12:07:04 INFO::Fitting model to feature number 4, B. vulgatus
|+++++++++++++++++++++++ | 44% ~00s 2021-11-15 12:07:04 INFO::Fitting model to feature number 5, C. perfringens
|++++++++++++++++++++++++++++ | 56% ~00s 2021-11-15 12:07:04 INFO::Fitting model to feature number 6, E. coli
|++++++++++++++++++++++++++++++++++ | 67% ~00s 2021-11-15 12:07:04 INFO::Fitting model to feature number 7, E. faecalis
|+++++++++++++++++++++++++++++++++++++++ | 78% ~00s 2021-11-15 12:07:04 INFO::Fitting model to feature number 8, K. pneumoniae
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~00s 2021-11-15 12:07:04 INFO::Fitting model to feature number 9, B. fragilis
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=00s
2021-11-15 12:07:04 INFO::Counting total values for each feature
2021-11-15 12:07:04 WARNING::Deleting existing residuals file: output_nondigested_ingredient_noRM/residuals.rds
2021-11-15 12:07:04 INFO::Writing residuals to file output_nondigested_ingredient_noRM/residuals.rds
2021-11-15 12:07:04 INFO::Writing all results to file (ordered by increasing q-values): output_nondigested_ingredient_noRM/all_results.tsv
2021-11-15 12:07:04 INFO::Writing the significant results (those which are less than or equal to the threshold of 0.250000 ) to file (ordered by increasing q-values): output_nondigested_ingredient_noRM/significant_results.tsv
2021-11-15 12:07:04 INFO::Writing heatmap of significant results to file: output_nondigested_ingredient_noRM/heatmap.pdf
2021-11-15 12:07:05 INFO::Writing association plots (one for each significant association) to output folder: output_nondigested_ingredient_noRM
2021-11-15 12:07:05 INFO::Plotting associations from most to least significant, grouped by metadata
2021-11-15 12:07:05 INFO::Plotting data for metadata number 1, Dietary.Fiber
2021-11-15 12:07:05 INFO::Creating scatter plot for continuous data, Dietary.Fiber vs C. perfringens
2021-11-15 12:07:06 INFO::Creating scatter plot for continuous data, Dietary.Fiber vs B. vulgatus
2021-11-15 12:07:06 INFO::Creating scatter plot for continuous data, Dietary.Fiber vs K. pneumoniae
2021-11-15 12:07:06 INFO::Plotting data for metadata number 2, Fat
2021-11-15 12:07:06 INFO::Creating scatter plot for continuous data, Fat vs C. perfringens
2021-11-15 12:07:06 INFO::Creating scatter plot for continuous data, Fat vs B. longum
2021-11-15 12:07:06 INFO::Creating scatter plot for continuous data, Fat vs B. breve
2021-11-15 12:07:07 INFO::Creating scatter plot for continuous data, Fat vs K. pneumoniae
2021-11-15 12:07:07 INFO::Creating scatter plot for continuous data, Fat vs B. vulgatus
2021-11-15 12:07:07 INFO::Plotting data for metadata number 3, Carbohydrate
2021-11-15 12:07:07 INFO::Creating scatter plot for continuous data, Carbohydrate vs C. perfringens
2021-11-15 12:07:07 INFO::Creating scatter plot for continuous data, Carbohydrate vs B. breve
2021-11-15 12:07:07 INFO::Creating scatter plot for continuous data, Carbohydrate vs E. faecalis
2021-11-15 12:07:08 INFO::Creating scatter plot for continuous data, Carbohydrate vs B. fragilis
2021-11-15 12:07:08 INFO::Creating scatter plot for continuous data, Carbohydrate vs B. longum
2021-11-15 12:07:08 INFO::Creating scatter plot for continuous data, Carbohydrate vs K. pneumoniae
So it stops here and does not continue further. Plots only Fat, Dietary.Fiber, Carbohydrate but no Protein. Then, I change the order of the fixed effects in my command, putting protein earlier than dietary fiber
fit_data = Maaslin2(
input_data = df_input_data,
input_metadata = df_input_metadata,
output = “output_nondigested_ingredient_noRM”, fixed_effects= c(“Fat”, “Protein”, “Carbohydrate”, “Dietary.Fiber”), random_effects = NULL, normalization = ‘NONE’, transform= “LOG”, standardize = TRUE, plot_heatmap = TRUE, plot_scatter = TRUE, heatmap_first_n = 10)
Then the plot is only fat, protein carbohydrate.
2021-11-15 12:15:40 INFO::Writing association plots (one for each significant association) to output folder: output_nondigested_ingredient_noRM
2021-11-15 12:15:40 INFO::Plotting associations from most to least significant, grouped by metadata
2021-11-15 12:15:40 INFO::Plotting data for metadata number 1, Fat
2021-11-15 12:15:40 INFO::Creating scatter plot for continuous data, Fat vs C. perfringens
2021-11-15 12:15:40 INFO::Creating scatter plot for continuous data, Fat vs B. vulgatus
2021-11-15 12:15:40 INFO::Creating scatter plot for continuous data, Fat vs K. pneumoniae
2021-11-15 12:15:40 INFO::Plotting data for metadata number 2, Protein
2021-11-15 12:15:40 INFO::Creating scatter plot for continuous data, Protein vs C. perfringens
2021-11-15 12:15:40 INFO::Creating scatter plot for continuous data, Protein vs B. vulgatus
2021-11-15 12:15:41 INFO::Creating scatter plot for continuous data, Protein vs K. pneumoniae
2021-11-15 12:15:41 INFO::Plotting data for metadata number 3, Carbohydrate
2021-11-15 12:15:41 INFO::Creating scatter plot for continuous data, Carbohydrate vs C. perfringens
2021-11-15 12:15:41 INFO::Creating scatter plot for continuous data, Carbohydrate vs B. vulgatus
2021-11-15 12:15:41 INFO::Creating scatter plot for continuous data, Carbohydrate vs K. pneumoniae
What I am saying it does not run the 4th fixed effect no matter what it is.
I am including my data, see if you can replicate that. Am I missing something in my R command?
abundance_lefse.txt (2.9 KB)
metadata_noRM.txt (878 Bytes)