Description Usage Arguments Details Value Note Author(s) Examples
Generates from a nexus tree file the possible ancestral sequence and compares this with the sequence alignment.
1 2 3 4 | comparewithancestral(path_to_file_sequence_alignment = NULL,
path_to_file_nexus_tree = NULL, save_name_csv,
patnum_threshold = 1, significance_level = 0.05,
A11, A12, A21, A22, B11, B12, B21, B22)
|
path_to_file_sequence_alignment |
FASTA file with sequence alignment. For reference see example file. |
path_to_file_nexus_tree |
nexus tree file of sequences alignment. For reference see example file. |
save_name_csv |
name of file to which results are saved in csv format. |
patnum_threshold |
minimum number of patients per HLA type to consider in calculation. |
significance_level |
significance level in Fisher's exact test. |
A11 |
position of start of first HLA A allele in header line of FASTA file. |
A12 |
position of end of first HLA A allele in header line of FASTA file. |
A21 |
position of start of second HLA A allele in header line of FASTA file. |
A22 |
position of end of second HLA A allele in header line of FASTA file. |
B11 |
position of start of first HLA B allele in header line of FASTA file. |
B12 |
position of end of first HLA B allele in header line of FASTA file. |
B21 |
position of start of second HLA B allele in header line of FASTA file. |
B22 |
position of end of second HLA B allele in header line of FASTA file. |
Features may be HLA types, indicated by four blocks in the FASTA comment lines. The positions of these blocks in the comment lines are defined by parameters A11, ..., B22. For patients with a homozygous HLA allele the second allele has to be "00" (without the double quotes).
Uses the R-packages ape and phangorn to create from a given nexus tree file the ancestral sequence. For every sequence position the ancestral amino acid is compared with the amino acid of every HLA type and with a Fisher's exact test the significant differences are calculated.
Generates a csv file with p-values and q-values (generated by the R-package qvalue) for every HLA type and sequence position with a p-value below given threshold (significance_level).
BEWARE! You have to name the FASTA sequences (= comment line in the file) so that the R-packages ape and phangorn can read and write them correctly. It will replace any space character with "_" (without the double quotes) and ignore ":" (without the double quotes)!
Bettina Budeus
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | #Input files
## Not run:
fasta_input <- system.file("extdata", "Example_aa_for_cwa.fasta", package="SeqFeatR")
tree_input <- system.file("extdata", "Example_tree.nh", package="SeqFeatR")
#Usage
comparewithancestral(
path_to_file_sequence_alignment=fasta_input,
path_to_file_nexus_tree=tree_input,
save_name_csv="hlaTree_results.csv",
patnum_threshold=1,
significance_level=0.05,
A11=10,
A12=11,
A21=13,
A22=14,
B11=17,
B12=18,
B21=20,
B22=21)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.