edit names in phylogenetic tree in newick format
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I have a phylogenetic tree in newick format, and I would like to remove some fragments of the name of the taxa,
1_[genus_specie_1]_characters:0.2654682758,(((((((((((((((2_[genus_specie_2]_characters:0.0379334280,54_[genus_specie_2]_characters:0.0605802067)/1/100:0.0121248674,(3_[genus_specie_3]_characters:0.0206432295,4_[genus_specie_4]_characters:0.0141250479)/1/100:0.0647820408)/1/100:0.0235327264,30_[genus_specie_5]_characters
I would like to remove the fragments out of the square brackets, for example
genus_specie_1:0.2654682758,(((((((((((((((genus_specie_2:0.0379334280,genus_specie_2:0.0605802067)/1/100:0.0121248674,(genus_specie_3:0.0206432295,genus_specie_4:0.0141250479)/1/100:0.0647820408)/1/100:0.0235327264,genus_specie_5
perl -i -pe 'y///d' file.nwk
and I have also tried whit the next sed command
sed 's/[[:alnum:]_]*[([[:alnum:]_]*)][[:alnum:]_]*/1/g'
but it doesn't work
linux shell sed perl
New contributor
add a comment |Â
up vote
0
down vote
favorite
I have a phylogenetic tree in newick format, and I would like to remove some fragments of the name of the taxa,
1_[genus_specie_1]_characters:0.2654682758,(((((((((((((((2_[genus_specie_2]_characters:0.0379334280,54_[genus_specie_2]_characters:0.0605802067)/1/100:0.0121248674,(3_[genus_specie_3]_characters:0.0206432295,4_[genus_specie_4]_characters:0.0141250479)/1/100:0.0647820408)/1/100:0.0235327264,30_[genus_specie_5]_characters
I would like to remove the fragments out of the square brackets, for example
genus_specie_1:0.2654682758,(((((((((((((((genus_specie_2:0.0379334280,genus_specie_2:0.0605802067)/1/100:0.0121248674,(genus_specie_3:0.0206432295,genus_specie_4:0.0141250479)/1/100:0.0647820408)/1/100:0.0235327264,genus_specie_5
perl -i -pe 'y///d' file.nwk
and I have also tried whit the next sed command
sed 's/[[:alnum:]_]*[([[:alnum:]_]*)][[:alnum:]_]*/1/g'
but it doesn't work
linux shell sed perl
New contributor
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have a phylogenetic tree in newick format, and I would like to remove some fragments of the name of the taxa,
1_[genus_specie_1]_characters:0.2654682758,(((((((((((((((2_[genus_specie_2]_characters:0.0379334280,54_[genus_specie_2]_characters:0.0605802067)/1/100:0.0121248674,(3_[genus_specie_3]_characters:0.0206432295,4_[genus_specie_4]_characters:0.0141250479)/1/100:0.0647820408)/1/100:0.0235327264,30_[genus_specie_5]_characters
I would like to remove the fragments out of the square brackets, for example
genus_specie_1:0.2654682758,(((((((((((((((genus_specie_2:0.0379334280,genus_specie_2:0.0605802067)/1/100:0.0121248674,(genus_specie_3:0.0206432295,genus_specie_4:0.0141250479)/1/100:0.0647820408)/1/100:0.0235327264,genus_specie_5
perl -i -pe 'y///d' file.nwk
and I have also tried whit the next sed command
sed 's/[[:alnum:]_]*[([[:alnum:]_]*)][[:alnum:]_]*/1/g'
but it doesn't work
linux shell sed perl
New contributor
I have a phylogenetic tree in newick format, and I would like to remove some fragments of the name of the taxa,
1_[genus_specie_1]_characters:0.2654682758,(((((((((((((((2_[genus_specie_2]_characters:0.0379334280,54_[genus_specie_2]_characters:0.0605802067)/1/100:0.0121248674,(3_[genus_specie_3]_characters:0.0206432295,4_[genus_specie_4]_characters:0.0141250479)/1/100:0.0647820408)/1/100:0.0235327264,30_[genus_specie_5]_characters
I would like to remove the fragments out of the square brackets, for example
genus_specie_1:0.2654682758,(((((((((((((((genus_specie_2:0.0379334280,genus_specie_2:0.0605802067)/1/100:0.0121248674,(genus_specie_3:0.0206432295,genus_specie_4:0.0141250479)/1/100:0.0647820408)/1/100:0.0235327264,genus_specie_5
perl -i -pe 'y///d' file.nwk
and I have also tried whit the next sed command
sed 's/[[:alnum:]_]*[([[:alnum:]_]*)][[:alnum:]_]*/1/g'
but it doesn't work
linux shell sed perl
linux shell sed perl
New contributor
New contributor
New contributor
asked 1 min ago
erick rodriguez
61
61
New contributor
New contributor
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
erick rodriguez is a new contributor. Be nice, and check out our Code of Conduct.
erick rodriguez is a new contributor. Be nice, and check out our Code of Conduct.
erick rodriguez is a new contributor. Be nice, and check out our Code of Conduct.
erick rodriguez is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f474927%2fedit-names-in-phylogenetic-tree-in-newick-format%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password