コード例 #1
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Requires({"name != null", "! ( location == null && output == null )", "! ( enableOnTheFlyIndexing && location == null )"}) protected IndexingVariantContextWriter(final String name, final File location, final OutputStream output, final net.sf.samtools.SAMSequenceDictionary refDict, final boolean enableOnTheFlyIndexing)
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
		protected internal IndexingVariantContextWriter(string name, File location, OutputStream output, SAMSequenceDictionary refDict, bool enableOnTheFlyIndexing)
		{
			outputStream = output;
			this.name = name;
			this.refDict = refDict;

			if (enableOnTheFlyIndexing)
			{
				try
				{
					idxStream = new LittleEndianOutputStream(new FileOutputStream(Tribble.indexFile(location)));
					//System.out.println("Creating index on the fly for " + location);
					indexer = new DynamicIndexCreator(IndexFactory.IndexBalanceApproach.FOR_SEEK_TIME);
					indexer.initialize(location, indexer.defaultBinSize());
					positionalOutputStream = new PositionalOutputStream(output);
					outputStream = positionalOutputStream;
				}
				catch (IOException ex)
				{
					// No matter what we keep going, since we don't care if we can't create the index file
					idxStream = null;
					indexer = null;
					positionalOutputStream = null;
				}
			}
		}
コード例 #2
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Requires({"name != null", "! ( location == null && output == null )", "! ( enableOnTheFlyIndexing && location == null )"}) protected IndexingVariantContextWriter(final String name, final File location, final OutputStream output, final net.sf.samtools.SAMSequenceDictionary refDict, final boolean enableOnTheFlyIndexing)
//JAVA TO C# CONVERTER WARNING: 'final' parameters are not allowed in .NET:
        protected internal IndexingVariantContextWriter(string name, File location, OutputStream output, SAMSequenceDictionary refDict, bool enableOnTheFlyIndexing)
        {
            outputStream = output;
            this.name    = name;
            this.refDict = refDict;

            if (enableOnTheFlyIndexing)
            {
                try
                {
                    idxStream = new LittleEndianOutputStream(new FileOutputStream(Tribble.indexFile(location)));
                    //System.out.println("Creating index on the fly for " + location);
                    indexer = new DynamicIndexCreator(IndexFactory.IndexBalanceApproach.FOR_SEEK_TIME);
                    indexer.initialize(location, indexer.defaultBinSize());
                    positionalOutputStream = new PositionalOutputStream(output);
                    outputStream           = positionalOutputStream;
                }
                catch (IOException ex)
                {
                    // No matter what we keep going, since we don't care if we can't create the index file
                    idxStream = null;
                    indexer   = null;
                    positionalOutputStream = null;
                }
            }
        }