Open ndreey opened 1 year ago
CREATING DATAFRAME
genome_id size taxid tax_group group
pseudo code
list_genome_id = []
list_size = []
list_NCBI = []
list_tax_group = []
list_group = []
for *.fasta in source_genomes/:
# Get genome_id
match genome_id with *.fasta filename using genome_to_id.txt
add genome_id to list_genome_id
# Get size
match size with *.fasta filename using report_genome.txt
add size to list_size
# Get taxid
match NCBI_ID with genome_id using metadata.tsv
add NCBI_ID to list_NCBI
# Get taxonomy group id
match tax_group with NCBI_ID using taxonomic_profile.tsv
in $TAXPATH get first number ^[0-9]| # 2|1239|186801 --> 2
add tax_group to list_tax_group
# Get humanized group name
match tax_group with group using if
if tax_group != 2759:
group = "not_euk"
else:
group = "euk"
add group to list_group
# Create dataframe
df <- data.frame(genome_id = list_genome_id, size=, taxid=, tax_group=, group=)
Thaliana genome (GCF_000001735.4_TAIR10.1_genomic) has been replaced with Platanthera_zijinensis_chr
Added these to source_genomes/
Going with 70-80% Fungi, 20-30% Bacteria/Archaea and 0.5-2% Plasmids/Circular DNA/Virus #17
Example
The relative abundance between the endophytes are:
With the chosen genomes, generate the abundance profiles. Smartest seems to create a bash script that generates it for us. Here is info from my comment on [#13]
HOW I UNDERSTAND THE ABUNDANCE CALCULATION The abundance is calculated based on the total sum of genome sizes.
G1, G2, G3, ..., G10, Orchid
genomes. And i wantOrchid
to have an abundance of 50%.G1:G5
is 1000bp each,G6:G10
is 1500bp each andOrchid
is 12000bpabu = 1 / (number of genomes - 1)
Orchid
to 0.5abu_tot = abu_orchid + sum(abu_G1:abu_G10)
nrm_abu_orchid = abu_ochid / abu_tot
= 0.5 / 1.5 = 0.3333abundance.tsv
file0.0741 x 10 + 0.3333 ~ 1
Good info on these issues