fn from_string (seq_str: &String) -> Seq {
        let mut lines = seq_str.lines();
        let id = lines.next().expect("Could not parse ID");
        let seq = lines.next().expect("Could not parse sequence");
        lines.next().expect("Could not parse +");
        let qual_opt = lines.next();
        if qual_opt == None {
            return Seq::blank();
        }
        let qual = qual_opt.expect("Could not read the qual line");

        // TODO try to guess the pair ID, e.g., replace /1 with /2

        return Seq{
            id:       id.to_string(),
            seq:      seq.to_string(),
            qual:     qual.to_string(),
            pairid:   String::new(),
            thresholds: HashMap::new(),
        }
    }
/// Create a sequence object from a string.
/// TODO make it more like the careful method than quick.
Create a sequence object from a string.
TODO make it more like the careful method than quick.
Create a sequence object from a string . TODO make it more like the careful method than quick .
fn from_string (seq_str: &String) -> Seq {
        let mut lines = seq_str.lines();
        let id = lines.next().expect("Could not parse ID");
        let seq = lines.next().expect("Could not parse sequence");
        lines.next().expect("Could not parse +");
        let qual_opt = lines.next();
        if qual_opt == None {
            return Seq::blank();
        }
        let qual = qual_opt.expect("Could not read the qual line");
        // TODO try to guess the pair ID, e.g., replace /1 with /2
        return Seq{
            id:       id.to_string(),
            seq:      seq.to_string(),
            qual:     qual.to_string(),
            pairid:   String::new(),
            thresholds: HashMap::new(),
        }
    }
fn from_string ( seq_str : & String ) -> Seq { let mut lines = seq_str . lines ( ) ; let id = lines . next ( ) . expect ( " " ) ; let seq = lines . next ( ) . expect ( " " ) ; lines . next ( ) . expect ( " " ) ; let qual_opt = lines . next ( ) ; if qual_opt == None { return Seq :: blank ( ) ; } let qual = qual_opt . expect ( " " ) ; // TODO try to guess the pair ID, e.g., replace /1 with /2 return Seq { id : id . to_string ( ) , seq : seq . to_string ( ) , qual : qual . to_string ( ) , pairid : String :: new ( ) , thresholds : HashMap :: new ( ) , } }
Create a sequence object from a string.
Create a sequence object from a string .
seq_str
&String
seq_str
&String