{
setId(pdbId);
setPDBIdAvailable(true);
- Console.debug("##### DATASOURCETYPE=" + getDataSourceType());
- setAlphafoldModel(alphaFold.search(pdbId) && isMMCIF
- && getDataSourceType() == DataSourceType.URL);
+ setAlphafoldModel(alphaFold.search(pdbId) && isMMCIF);
}
List<Atom> significantAtoms = convertSignificantAtoms(ms);
for (Atom tmpatom : significantAtoms)
}
}
// add a PAEMatrix if set (either by above or otherwise)
- Console.debug("##### hasPAEMatrix()=" + hasPAEMatrix());
- Console.debug("##### isAlphafoldModel()=" + isAlphafoldModel());
- Console.debug("##### getPAEMatrix()=" + getPAEMatrix());
if (hasPAEMatrix())
{
Alignment al = new Alignment(prot.toArray(new SequenceI[0]));
- if (isAlphafoldModel())
- {
- EBIAlfaFold.addAlphaFoldPAE(al, new File(this.getPAEMatrix()), 0,
- null, false, false);
- }
- else
- {
- EBIAlfaFold.addPAEToStructure(null, this.getInFile(),
- new File(this.getPAEMatrix()));
- }
+ EBIAlfaFold.addAlphaFoldPAE(al, new File(this.getPAEMatrix()), 0,
+ null, false, false);
- Console.debug("##### al.getAlignmentAnnotation()="
- + al.getAlignmentAnnotation());
if (al.getAlignmentAnnotation() != null)
{
for (AlignmentAnnotation alann : al.getAlignmentAnnotation())
{
- Console.debug("##### Adding to alann" + alann.annotationId + "("
- + alann.getCalcId() + ")");
annotations.add(alann);
}
}
import jalview.api.FeatureSettingsModelI;
import jalview.bin.Console;
-import jalview.datamodel.AlignedCodonFrame;
import jalview.datamodel.AlignmentAnnotation;
import jalview.datamodel.AlignmentI;
import jalview.datamodel.ContactMatrixI;
import jalview.io.FileFormatI;
import jalview.io.FormatAdapter;
import jalview.io.PDBFeatureSettings;
+import jalview.structure.StructureImportSettings.TFType;
import jalview.structure.StructureMapping;
import jalview.structure.StructureSelectionManager;
import jalview.util.MessageManager;
@Override
public AlignmentI getSequenceRecords(String queries) throws Exception
{
- return getSequenceRecords(queries, null);
+ // used by the SequenceFetcher. Put forSequencesOnly to true (don't open
+ // structure viewer later)
+ return getSequenceRecords(queries, null, true);
}
public AlignmentI getSequenceRecords(String queries, String retrievalUrl)
throws Exception
{
+ return getSequenceRecords(queries, retrievalUrl, false);
+ }
+
+ public AlignmentI getSequenceRecords(String queries, String retrievalUrl,
+ boolean forSequencesOnly) throws Exception
+ {
AlignmentI pdbAlignment = null;
String chain = null;
String id = null;
{
return null;
}
+ // TODO Get the PAE file somewhere around here and remove from JmolParser
pdbAlignment = importDownloadedStructureFromUrl(alphaFoldCif, tmpFile,
id, chain, getDbSource(), getDbVersion());
stopQuery();
throw (ex);
}
+ // distinguish between AlphaFold cif/pdb opened as structure file or fetched
+ // as sequence/alignment
return pdbAlignment;
}
* @throws Exception
*/
public static boolean importPaeJSONAsContactMatrixToSequence(
- AlignmentI pdbAlignment, InputStream pae_input)
- throws IOException, ParseException
- {
- return importPaeJSONAsContactMatrixToSequence(pdbAlignment, pae_input,
- 0, null);
- }
-
- public static boolean importPaeJSONAsContactMatrixToSequence(
- AlignmentI pdbAlignment, File paeFile, int index, String seqId)
- throws FileNotFoundException, IOException, ParseException
- {
- return importPaeJSONAsContactMatrixToSequence(pdbAlignment,
- new FileInputStream(paeFile), index, seqId);
- }
-
- public static boolean importPaeJSONAsContactMatrixToSequence(
AlignmentI pdbAlignment, InputStream pae_input, int index,
String seqId) throws IOException, ParseException
{
}
public static boolean importPaeJSONAsContactMatrixToSequence(
- AlignmentI pdbAlignment, File pae_input, SequenceI sequence)
- throws IOException, ParseException
- {
- return importPaeJSONAsContactMatrixToSequence(pdbAlignment,
- new FileInputStream(pae_input), sequence);
- }
-
- public static boolean importPaeJSONAsContactMatrixToSequence(
AlignmentI pdbAlignment, InputStream pae_input,
SequenceI sequence) throws IOException, ParseException
{
(Map<String, Object>) pae_obj);
AlignmentAnnotation cmannot = sm.getSequence().addContactList(matrix);
- // sm.getSequence().addAlignmentAnnotation(cmannot);
- sm.transfer(cmannot);
- // return true;
-
- StructureSelectionManager ssm = StructureSelectionManager
- .getStructureSelectionManager(Desktop.instance);
- List<AlignedCodonFrame> acfList = ssm.getSequenceMappings();
+ sm.getSequence().addAlignmentAnnotation(cmannot);
return true;
}
String file = tmpFile.getAbsolutePath();
// todo get rid of Type and use FileFormatI instead?
FileFormatI fileFormat = FileFormat.MMCif;
- AlignmentI pdbAlignment = new FormatAdapter().readFile(tmpFile,
- DataSourceType.FILE, fileFormat);
+ TFType tempfacType = TFType.PLDDT;
+ AlignmentI pdbAlignment = new FormatAdapter().readFile(tmpFile, file,
+ DataSourceType.FILE, fileFormat, tempfacType);
+
if (pdbAlignment != null)
{
List<SequenceI> toremove = new ArrayList<SequenceI>();
if (pid.getFile() == file)
{
chid = pid.getChainCode();
-
}
}
if (chain == null || (chid != null && (chid.equals(chain)