func NewReactionParticipant(description Description, containsx ContainsX, compoundParticipantMap map[string]string) (ReactionParticipant, error) {
	// Get reaction sides
	// gzip -d -k -c rhea.rdf.gz | grep -o -P '(?<=contains).*(?= rdf)' | tr ' ' '\n' | sort -u | tr '\n' ' '
	// The exceptions to numeric contains are 2n, N, Nminus1, and Nplus1
	var newReactionParticipant ReactionParticipant
	switch containsx.XMLName.Local {
	case "containsN":
		newReactionParticipant = ReactionParticipant{
			ReactionSide: description.About,
			Contains:     1,
			ContainsN:    true,
			Minus:        false,
			Plus:         false,
			Accession:    containsx.Content}
	case "contains2n":
		newReactionParticipant = ReactionParticipant{
			ReactionSide: description.About,
			Contains:     2,
			ContainsN:    true,
			Minus:        false,
			Plus:         false,
			Accession:    containsx.Content}
	case "containsNminus1":
		newReactionParticipant = ReactionParticipant{
			ReactionSide: description.About,
			Contains:     1,
			ContainsN:    true,
			Minus:        true,
			Plus:         false,
			Accession:    containsx.Content}
	case "containsNplus1":
		newReactionParticipant = ReactionParticipant{
			ReactionSide: description.About,
			Contains:     1,
			ContainsN:    true,
			Minus:        false,
			Plus:         true,
			Accession:    containsx.Content}
	default:
		i, err := strconv.Atoi(containsx.XMLName.Local[8:])
		if err != nil {
			return ReactionParticipant{}, err
		}
		newReactionParticipant = ReactionParticipant{
			ReactionSide: description.About,
			Contains:     i,
			ContainsN:    false,
			Minus:        false,
			Plus:         false,
			Accession:    containsx.Content}
	}
	newReactionParticipant.Compound = compoundParticipantMap[description.About]
	return newReactionParticipant, nil
}
// NewReactionParticipant returns a ReactionParticipant.
NewReactionParticipant returns a ReactionParticipant.
// NewReactionParticipant returns a ReactionParticipant .
func NewReactionParticipant(description Description, containsx ContainsX, compoundParticipantMap map[string]string) (ReactionParticipant, error) {
	var newReactionParticipant ReactionParticipant
	switch containsx.XMLName.Local {
	case "containsN":
		newReactionParticipant = ReactionParticipant{
			ReactionSide: description.About,
			Contains:     1,
			ContainsN:    true,
			Minus:        false,
			Plus:         false,
			Accession:    containsx.Content}
	case "contains2n":
		newReactionParticipant = ReactionParticipant{
			ReactionSide: description.About,
			Contains:     2,
			ContainsN:    true,
			Minus:        false,
			Plus:         false,
			Accession:    containsx.Content}
	case "containsNminus1":
		newReactionParticipant = ReactionParticipant{
			ReactionSide: description.About,
			Contains:     1,
			ContainsN:    true,
			Minus:        true,
			Plus:         false,
			Accession:    containsx.Content}
	case "containsNplus1":
		newReactionParticipant = ReactionParticipant{
			ReactionSide: description.About,
			Contains:     1,
			ContainsN:    true,
			Minus:        false,
			Plus:         true,
			Accession:    containsx.Content}
	default:
		i, err := strconv.Atoi(containsx.XMLName.Local[8:])
		if err != nil {
			return ReactionParticipant{}, err
		}
		newReactionParticipant = ReactionParticipant{
			ReactionSide: description.About,
			Contains:     i,
			ContainsN:    false,
			Minus:        false,
			Plus:         false,
			Accession:    containsx.Content}
	}
	newReactionParticipant.Compound = compoundParticipantMap[description.About]
	return newReactionParticipant, nil
}
func NewReactionParticipant ( description Description , containsx ContainsX , compoundParticipantMap map [ string ] string ) ( ReactionParticipant , error ) { var newReactionParticipant ReactionParticipant switch containsx . XMLName . Local { case " " : newReactionParticipant = ReactionParticipant { ReactionSide : description . About , Contains : 1 , ContainsN : true , Minus : false , Plus : false , Accession : containsx . Content } case " " : newReactionParticipant = ReactionParticipant { ReactionSide : description . About , Contains : 2 , ContainsN : true , Minus : false , Plus : false , Accession : containsx . Content } case " " : newReactionParticipant = ReactionParticipant { ReactionSide : description . About , Contains : 1 , ContainsN : true , Minus : true , Plus : false , Accession : containsx . Content } case " " : newReactionParticipant = ReactionParticipant { ReactionSide : description . About , Contains : 1 , ContainsN : true , Minus : false , Plus : true , Accession : containsx . Content } default : i , err := strconv . Atoi ( containsx . XMLName . Local [ 8 : ] ) if err != nil { return ReactionParticipant { } , err } newReactionParticipant = ReactionParticipant { ReactionSide : description . About , Contains : i , ContainsN : false , Minus : false , Plus : false , Accession : containsx . Content } } newReactionParticipant . Compound = compoundParticipantMap [ description . About ] return newReactionParticipant , nil }
NewReactionParticipant returns a ReactionParticipant.
NewReactionParticipant returns a ReactionParticipant .
// Get reaction sides // gzip -d -k -c rhea.rdf.gz | grep -o -P '(?<=contains).*(?= rdf)' | tr ' ' '\n' | sort -u | tr '\n' ' ' // The exceptions to numeric contains are 2n, N, Nminus1, and Nplus1