6
6
using System . Collections . Generic ;
7
7
using System . Globalization ;
8
8
using System . IO ;
9
- using System . IO . Compression ;
10
9
using System . Linq ;
11
10
using System . Text ;
12
- using System . Xml ;
13
11
14
12
namespace TaskLayer
15
13
{
@@ -22,6 +20,7 @@ public enum MyTask
22
20
23
21
public abstract class MetaMorpheusTask : MyEngine
24
22
{
23
+
25
24
#region Public Fields
26
25
27
26
public List < string > rawDataFilenameList ;
@@ -267,32 +266,6 @@ private static IEnumerable<ModList> LoadMods()
267
266
yield return new ModList ( modFile ) ;
268
267
}
269
268
270
- private static HashSet < string > ReadXmlModifications ( IEnumerable < string > uniProtXmlProteomeDatabaseFilepaths )
271
- {
272
- var modifications_in_database = new HashSet < string > ( ) ;
273
- foreach ( var uniProtXmlProteomeDatabaseFilepath in uniProtXmlProteomeDatabaseFilepaths )
274
- using ( var stream = new FileStream ( uniProtXmlProteomeDatabaseFilepath , FileMode . Open ) )
275
- {
276
- Stream uniprotXmlFileStream = stream ;
277
- if ( uniProtXmlProteomeDatabaseFilepath . EndsWith ( ".gz" , StringComparison . OrdinalIgnoreCase ) )
278
- uniprotXmlFileStream = new GZipStream ( stream , CompressionMode . Decompress ) ;
279
- using ( XmlReader xml = XmlReader . Create ( uniprotXmlFileStream ) )
280
- while ( xml . ReadToFollowing ( "feature" ) )
281
- if ( xml . GetAttribute ( "type" ) == "modified residue" )
282
- {
283
- string description = xml . GetAttribute ( "description" ) ;
284
- if ( ! description . Contains ( "variant" ) )
285
- {
286
- int semicolon_index = description . IndexOf ( ';' ) ;
287
- if ( semicolon_index >= 0 )
288
- description = description . Substring ( 0 , semicolon_index ) ;
289
- modifications_in_database . Add ( description ) ;
290
- }
291
- }
292
- }
293
- return modifications_in_database ;
294
- }
295
-
296
269
private void finishedSingleTask ( )
297
270
{
298
271
FinishedSingleTaskHandler ? . Invoke ( this , new SingleTaskEventArgs ( this ) ) ;
@@ -304,5 +277,6 @@ private void startingSingleTask()
304
277
}
305
278
306
279
#endregion Private Methods
280
+
307
281
}
308
282
}
0 commit comments