jflucier / ILL_pipelines

Isabelle Laforest-Lapointe Laboratory code
0 stars 1 forks source link

taxonomy table gen bug #48

Closed jflucier closed 1 year ago

jflucier commented 1 year ago

@jorondo1

cette ligne du script ne semble pas fonctionner correctement

C quoi exactement tu essaie de grepper dans le fichier temp_${taxa_oneletter}.tsv?

Si je regarde ce fichier je vois:

#Classification GQ10    GQ11    GQ12    GQ13    GQ14    GQ15    GQ16    GQ17b   GQ18    GQ19    GQ1
k__Bacteria 13993666    1296142 1249212 6083463 10630351    5558979 2491823 12398847    18862772    2354204 3185444
k__Bacteria|p__Synergistetes    228 10  18  646 579 80  441 44  49  342 585
k__Bacteria|p__Synergistetes|c__Synergistia 228 10  18  646 579 80  441 44  49  342 585
k__Bacteria|p__Spirochaetes 75409   1763    2657    14929   15500   2243    3978    1206    1144    4250    5841
k__Bacteria|p__Spirochaetes|c__Spirochaetia 75409   1763    2657    14929   15500   2243    3978    1206    1144    4250    5841
k__Bacteria|p__Fusobacteria 293255  36272   21256   111729  684003  31752   47727   465635  971487  60432   18307
k__Bacteria|p__Fusobacteria|c__Fusobacteriia    293255  36272   21256   111729  684003  31752   47727   465635  971487  60432   18307
k__Bacteria|p__Candidatus_Saccharibacteria  497785  917 892 28165   201732  5327    5100    26992   20542   2713    956
k__Bacteria|p__Candidatus_Saccharibacteria|c__Candidatus_Saccharimonia  497785  917 892 28165   201732  5327    5100    26992   20542   2713    956
k__Bacteria|p__Proteobacteria   1762043 238202  167095  2502613 1812190 1531303 538604  878199  1192599645932   431277
k__Bacteria|p__Proteobacteria|c__Deltaproteobacteria    0   0   0   0   0   226 1023    12  13  26  11
k__Bacteria|p__Proteobacteria|c__Oligoflexia    0   0   0   0   0   0   0   00  0   0
k__Bacteria|p__Proteobacteria|c__Alphaproteobacteria    92  43  35  355 36  122 112 50  96  35  115
k__Bacteria|p__Proteobacteria|c__Epsilonproteobacteria  280348  4287    7782    33564   48077   3936    15271   129227  111611  12524   14013

L'output dans le fichier #Classification GQ10 GQ11 GQ12 GQ13 GQ14 GQ15 GQ16 GQ17b GQ18 GQ19 GQ1

Dans cet exemple, le taxa_oneletter est C. Voici le code pour tester le script:

kreports="/nfs3_ib/ip29-ib/ip29/ilafores_group/projet_PROVID19/taxKB_conf01_jfl/*/*_bracken/*_C.kreport"
taxa_code=C
out=test
tmp=test/temp

bash $ILL_PIPELINES/scripts/taxonomic_table.allsamples.sh \
--kreports "$kreports" \
--taxa_code $taxa_code \
--out ${out} \
--tmp $tmp 

Essaie-tu de grpper pour les lignes qui ont "|c__" et qui ne sont pas a 0?

jorondo1 commented 1 year ago

je veux seulement conserver les lignes qui contiennent un seul niveau taxonomique pour créer une table d'abondance qui va servir aux analyses subséquentes. On peut seulement faire celle au niveau |s__ (et on veut aussi garder le header)

jorondo1 commented 1 year ago

ah, la lettre devrait être minuscule c'est peut-être pour ça que ça ne fonctionne pas?! dans tous les cas, seulement besoin de |s__ donc pas besoin de looper sur tous les niveaux avec une variable

jflucier commented 1 year ago

ouin j'vais deja fabrique le script. Il est maintenant dispo et fopnctionnel

commit id 271e984

jai egalement updater la doc pour expliquer comment tourner le script qui genere les tables pour tout les levels taxonomique, ca ressemble a ca:

export TAXONOMIC_ALL_LEVEL=(
    "D:domains"
    "P:phylums"
    "C:classes"
    "O:orders"
    "F:families"
    "G:genuses"
    "S:species"
)

out=test
tmp=test/temp

for taxa_str in ${TAXONOMIC_ALL_LEVEL[@]}
do
    taxa_code=${taxa_str%%:*}
    taxa_name=${taxa_str#*:}

    echo "generating taxonomic table for taxonomic level $taxa_name --> $taxa_code"
    kreports="/nfs3_ib/ip29-ib/ip29/ilafores_group/projet_PROVID19/taxKB_conf01_jfl/*/*_bracken/*_"$taxa_code".kreport"
    # echo $kreports
    bash $ILL_PIPELINES/scripts/taxonomic_table.allsamples.sh \
    --kreports "$kreports" \
    --taxa_code $taxa_code \
    --out $out \
    --tmp $tmp
done

enjoy!