Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

Parsing phylogenetic trees (newick format)

Aberta
#51 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
4/5
Tempo estimado
3-5 dias
Facilidade para iniciantes
45/100
Tipo de issue
Funcionalidade
Clareza
Razoavelmente clara
Status de atividade
Pouca atividade
Stack de tecnologia
rust
Domínio
bioinformatics

Direção de pesquisa

The issue asks for a new phylo.rs module that parses Newick strings into a struct and prints them back; the payload names no existing file to edit. Start by reading the Newick examples in the issue body and decide on the node representation. Done means the listed examples, from the unnamed tree through the rooted-on-a-leaf tree, parse and print back equivalently, with tests for each.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

Is your feature request related to a problem? Please describe.

Would like to add parsing of newick format just to print the newick in the first place. Newick is described here:https://en.wikipedia.org/wiki/Newick_format. It is possible to get multiple newick trees inside a single file, they each finish with a semicolon. Some trees can have many nodes, the structure is a graph-type with nodes, edges and leaves. There is an XML format that some python programs parse newick into, phyloXML

Describe the solution you'd like

Looking to start a module phylo.rs with a parse of newick into some type of good struct or hashmap in the first place, with just ability to print it out.

Describe alternatives you've considered

There are some newick tree parsers in crates.io but they all seem to be a few years old, for example newick_0.11.0

Additional context

Various types of newick tree to parse: The one below marked as "popular" is the one I've seen much the most often, so we could concentrate on that structure and allow the others if possible. There are multiple nodes.
(,,(,)); no nodes are named
(A,B,(C,D)); leaf nodes are named
(A,B,(C,D)E)F; all nodes are named
(:0.1,:0.2,(:0.3,:0.4):0.5); all but root node have a distance to parent
(:0.1,:0.2,(:0.3,:0.4):0.5):0.0; all have a distance to parent
(A:0.1,B:0.2,(C:0.3,D:0.4):0.5); distances and leaf names (popular)
(A:0.1,B:0.2,(C:0.3,D:0.4)E:0.5)F; distances and all names
((B:0.2,(C:0.3,D:0.4)E:0.5)F:0.1)A; a tree rooted on a leaf node (rare)

Linguagem predominante
Rust
Estrelas
38
Forks
15
Merge médio
21h 33min
PRs com merge (30d)
2

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de LCrossman/microBioRust

Todas as issues de LCrossman/microBioRust

Issues semelhantes

Mais issues de Rust

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.