/*
Recursively searches throughout the database and fetches the pathways that lead to your target compound.
This query excludes any compound that occurs more than 100 times in nodes. That parameter can change,
but once we start including things like NADPH, ATP, H2O, we step into combinatorial explosions.
id_path shows you the chain of equations starting from the top, and path shows you the actual compoounds
that build up a path, which is usually just the most significant reactants and products.
*/
Recursively searches throughout the database and fetches the pathways that lead to your target compound.
This query excludes any compound that occurs more than 100 times in nodes. That parameter can change,
but once we start including things like NADPH, ATP, H2O, we step into combinatorial explosions.
id_path shows you the chain of equations starting from the top, and path shows you the actual compoounds
that build up a path, which is usually just the most significant reactants and products.
/ * Recursively searches throughout the database and fetches the pathways that lead to your target compound . This query excludes any compound that occurs more than 100 times in nodes . That parameter can change but once we start including things like NADPH ATP H2O we step into combinatorial explosions . id_path shows you the chain of equations starting from the top and path shows you the actual compoounds that build up a path which is usually just the most significant reactants and products . * /
func GetTotalPathways(target_molecule string, levels int) ([]pathdata, error) {
	query, err := LoadSQLFile("./queries/get_total_pathways.sql")
	if err != nil {
		return nil, err
	}
	db, err := ConnectDB()
	if err != nil {
		return nil, err
	}
	target_id, err := NameToId(target_molecule)
	if err != nil {
		return nil, err
	}
	result := []pathdata{}
	err = db.Select(&result, query, target_id, levels)
	if err != nil {
		return result, err
	}
	db.Close()
	return result, err
}
func GetTotalPathways ( target_molecule string , levels int ) ( [ ] pathdata , error ) { query , err := LoadSQLFile ( " " ) if err != nil { return nil , err } db , err := ConnectDB ( ) if err != nil { return nil , err } target_id , err := NameToId ( target_molecule ) if err != nil { return nil , err } result := [ ] pathdata { } err = db . Select ( & result , query , target_id , levels ) if err != nil { return result , err } db . Close ( ) return result , err }
Recursively searches throughout the database and fetches the pathways that lead to your target compound.
Recursively searches throughout the database and fetches the pathways that lead to your target compound .