Skip to content

Commit ed846ff

Browse files
committed
Fixing badly formatted page after automatic conversion
1 parent 6cc082a commit ed846ff

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

_wikis/BioJava:CookBook3:MSA.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ title: BioJava:CookBook3:MSA
55
How to create a Multiple Sequence Alignment in BioJava
66
======================================================
77

8-
<java>
98

9+
```java
1010
package org.biojava.nbio.alignment;
1111

1212
import java.net.URL; import java.util.ArrayList; import java.util.List;
@@ -20,32 +20,32 @@ org.biojava.nbio.core.util.ConcurrencyTools;
2020

2121
public class CookbookMSA {
2222

23-
`   public static void main(String[] args) {`
24-
`       String[] ids = new String[] {"Q21691", "A8WS47", "O48771"};`
25-
`       try {`
26-
`           multipleSequenceAlignment(ids);`
27-
`       } catch (Exception e){`
28-
`           e.printStackTrace();`
29-
`       }`
30-
`   }`
31-
32-
`   private static void multipleSequenceAlignment(String[] ids) throws Exception {`
33-
`       List`<ProteinSequence>` lst = new ArrayList`<ProteinSequence>`();`
34-
`       for (String id : ids) {`
35-
`           lst.add(getSequenceForId(id));`
36-
`       }`
37-
`       Profile`<ProteinSequence, AminoAcidCompound>` profile = Alignments.getMultipleSequenceAlignment(lst);`
38-
`       System.out.printf("Clustalw:%n%s%n", profile);`
39-
`       ConcurrencyTools.shutdown();`
40-
`   }`
41-
42-
`   private static ProteinSequence getSequenceForId(String uniProtId) throws Exception {`
43-
`       URL uniprotFasta = new URL(String.format("`[`http://www.uniprot.org/uniprot/%s.fasta`](http://www.uniprot.org/uniprot/%s.fasta)`", uniProtId));`
44-
`       ProteinSequence seq = FastaReaderHelper.readFastaProteinSequence(uniprotFasta.openStream()).get(uniProtId);`
45-
`       System.out.printf("id : %s %s%n%s%n", uniProtId, seq, seq.getOriginalHeader());`
46-
`       return seq;`
47-
`   }`
23+
   public static void main(String[] args) {
24+
       String[] ids = new String[] {"Q21691""A8WS47""O48771"};
25+
       try {
26+
           multipleSequenceAlignment(ids);
27+
       } catch (Exception e){
28+
           e.printStackTrace();
29+
       }
30+
   }
31+
32+
   private static void multipleSequenceAlignment(String[] idsthrows Exception {
33+
       List<ProteinSequence> lst = new ArrayList<ProteinSequence>();
34+
       for (String id : ids) {
35+
           lst.add(getSequenceForId(id));
36+
       }
37+
       Profile<ProteinSequence, AminoAcidCompound> profile = Alignments.getMultipleSequenceAlignment(lst);
38+
       System.out.printf("Clustalw:%n%s%n", profile);
39+
       ConcurrencyTools.shutdown();
40+
   }
41+
42+
   private static ProteinSequence getSequenceForId(String uniProtIdthrows Exception {
43+
       URL uniprotFasta = new URL(String.format("http://www.uniprot.org/uniprot/%s.fasta", uniProtId));
44+
       ProteinSequence seq = FastaReaderHelper.readFastaProteinSequence(uniprotFasta.openStream()).get(uniProtId);
45+
       System.out.printf("id : %s %s%n%s%n", uniProtId, seq, seq.getOriginalHeader());
46+
       return seq;
47+
   }
4848

4949
}
5050

51-
</java>
51+
```

0 commit comments

Comments
 (0)