Skip to content

Commit

Permalink
-cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
Yossi Farjoun committed Mar 15, 2019
1 parent 097143b commit 0caa68b
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 25 deletions.
14 changes: 3 additions & 11 deletions src/main/java/htsjdk/samtools/util/IntervalList.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,7 @@

import java.io.*;
import java.nio.file.Path;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Comparator;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.*;

/**
* Represents a list of intervals against a reference sequence that can be written to
Expand Down Expand Up @@ -542,10 +536,8 @@ public static IntervalList fromReader(final BufferedReader in) {

// Then read in the intervals
do {
Interval nullableInterval = intervalListCodec.decode(line);
if (nullableInterval != null) {
list.intervals.add(nullableInterval);
}
final Optional<Interval> maybeInterval = Optional.ofNullable(intervalListCodec.decode(line));
maybeInterval.ifPresent(list.intervals::add);
}
while ((line = in.readLine()) != null);

Expand Down
33 changes: 20 additions & 13 deletions src/main/java/htsjdk/tribble/AsciiSamFeatureCodec.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,28 @@
/*
* Copyright (c) 2019 by The Broad Institute, Inc. and the Massachusetts Institute of Technology.
* All Rights Reserved.
* Copyright (c) 2019, The Broad Institute
*
* This software is licensed under the terms of the GNU Lesser General Public License (LGPL), Version 2.1 which
* is available at http://www.opensource.org/licenses/lgpl-2.1.php.
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use,
* copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following
* conditions:
*
* THE SOFTWARE IS PROVIDED "AS IS." THE BROAD AND MIT MAKE NO REPRESENTATIONS OR WARRANTIES OF
* ANY KIND CONCERNING THE SOFTWARE, EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT
* OR OTHER DEFECTS, WHETHER OR NOT DISCOVERABLE. IN NO EVENT SHALL THE BROAD OR MIT, OR THEIR
* RESPECTIVE TRUSTEES, DIRECTORS, OFFICERS, EMPLOYEES, AND AFFILIATES BE LIABLE FOR ANY DAMAGES OF
* ANY KIND, INCLUDING, WITHOUT LIMITATION, INCIDENTAL OR CONSEQUENTIAL DAMAGES, ECONOMIC
* DAMAGES OR INJURY TO PROPERTY AND LOST PROFITS, REGARDLESS OF WHETHER THE BROAD OR MIT SHALL
* BE ADVISED, SHALL HAVE OTHER REASON TO KNOW, OR IN FACT SHALL KNOW OF THE POSSIBILITY OF THE
* FOREGOING.
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/


package htsjdk.tribble;

import htsjdk.samtools.util.*;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
@SQ SN:chr1 LN:249250621
@SQ SN:chr2 LN:243199373
@SQ SN:chr3 LN:198022430
@SQ SN:chr3 LN:198022430

0 comments on commit 0caa68b

Please sign in to comment.