Analyzing 454 Sequencing
General Steps
- Check Mapping File
- Split Library
- Pick OTUs
- Pick Representative Sequence
- Align (Optional to do now or after building the table)
- Assign Taxonomy
- Build OTU Table
- Align (if not performed before assigning the taxonomy table)
Notes
- When running natively on MacQiime: must use macqiime (with a space after) before typing in code in the terminal window
- macqiime check_id_map.py -m Fasting_Map.txt -o mapping_output -v
- When running natively: $q/
- $q/check_id_map.py -m Fasting_Map.txt -o mapping_output -v
Combine Data Sets
If you have two .fna and .qual files that you want to combine and you have the same barcodes for both data sets do the following:
- Combine .qual files (simple copy and paste into a new file)
- Combine .fna files
- First you must edit each .fna file
-
- Copy and paste the file into Excel
- It should show up with a title <G234 etc. followed by the sequences in the following cells
- Ex. A1 = title A2 = sequence A3 = continuing sequence
- In the next column type =IF(ISNUMBER(SEARCH(“*>*”,A1)),”G”,””)
- This will put a G in the column B if column A has > (title)
- Shift column B down 1 cell
- In column C, =CONCATENATE(B1,A1)
- This will add a letter at the beginning of each sequence
- Save
Repeat with the second .fna file but be sure to use a different letter than G
Apply the same correction to the barcodes in your mapping files.
Creating Ordination Plot
- Align Sequences
- Filter
- Make Phylogenetic Tree
- Rarify
Analysis of beetle bacteria
- checking the mapping file:: check_id_map.py -m Beetle_map_NEW.txt -o mapping_test
- split_libraries.py -m Beetle_map_NEW.txt -f 5.TCA.454Reads.fna -q 5.TCA.454Reads.qual -o split_library_output
- pick_otus.py -i seqs.fna -o picked_clustered_otus/ #kept at default: similarity 0.97; reverse strand matching did not change the output
- picking representative sequences:: pick_rep_set.py -i picked_clustered_otus/seqs_otus.txt -f seqs.fna -o rep_set.fna #all default (the most common one)
- alignment by MUSCLE:: align_seqs.py -i rep_set.fna -m muscle -o alignment/
- taxonomy assignment:: assign_taxonomy.py -i rep_set.fna -m rdp
- make_otu_table.py -i picked_clustered_otus/seqs_otus.txt -t rdp22_assigned_taxonomy/rep_set_tax_assignments.txt -o OTU_table_NEW.txt # making OTU table
- rarefaction to three different levels: 41 (to get a few crassiusculus), 122 (to retain more mesonotal), 330.
- example with 41: single_rarefaction.py -i OTU_table_NEW.txt -o rarefaction/rarefaction_41.txt -d 41
- making preferences file:: make_prefs_file.py -m Beetle_map_NEW.txt -b”species,locality,species&&locality” -k white -o prefs_file.txt
- make phylogeny using Fasttree:: make_phylogeny.py -i alignment/rep_set_aligned.fna -o rep_phylogeny.tre
- beta diversity matrix of similarity
- with full matrix: beta_diversity.py -i OTU_table_NEW.txt -t rep_phylogeny.tre -o b_diversity/
- with rarefied matrices, e.g.: beta_diversity.py -i rarefaction/rarefaction_41.txt -t rep_phylogeny.tre -o b_diversity/
- PCoA batch: principal_coordinates.py -i b_diversity/ -o PCoA/
- making PCoA plots: make_2d_plots.py -i PCoA/pcoa_unweighted_unifrac_full_table.txt -m Beetle_map_NEW.txt -p prefs_file.txt -o 2d_plots/full_unweighted/
- making UPGMA cluster: upgma_cluster.py -i b_divers_condensed/unweighted_unifrac_rarefaction_41.txt -o b_divers_condensed/UPGMA_output.txt
- getting support for UPGMA nodes:
- multiple rarefactions: multiple_rarefactions.py -i b_divers_condensed_batch/OTU_table_NEW_condensed.txt -o b_divers_condensed_batch/ -m 41 -x 330 -s 10 -n 2
- beta_diversity.py -i b_divers_condensed_batch/ -t rep_phylogeny.tre -m unweighted_unifrac -o b_divers_condensed_batch_b_divers/
- upgma_cluster.py -i b_divers_condensed_batch_b_divers/ -o b_divers_condensed_UPGMAs/
- tree_compare.py -m b_diversity_condensed/master/UPGMA_master.tre -s b_divers_condensed_UPGMAs/ -o b_diversity_condensed/
WITH ZEROS for beetle without bacteria – didn’t work, the ones without bacteria drive all patterns
- bray_curtis and Binary jaccard:: beta_diversity.py -i OTU_table_incl_zeros.txt -m bray_curtis,binary_jaccard -o b_diversity_incl_zeros/